1
Program P96CheckBoards;
3
{***********************************************************************
4
* This is example shows how to use p96GetRTGDataTagList and p96GetBoardDataTagList
6
* tabt (Sat Sep 12 23:06:28 1998)
7
***********************************************************************}
10
Translated to fpc pascal.
16
nils.sjoholm@mailbox.swipnet.se
20
uses exec, amigados, graphics, picasso96api,utility,amigalib;
33
boardtmp : array[0..200] of char;
35
FUNCTION GetMonitorValue(value : longint): STRING;
37
IF value = 0 THEN GetMonitorValue := 'not set'
38
ELSE GetMonitorValue := 'set';
42
BoardName := @boardtmp;
44
tmp := p96GetRTGDataTags([P96RD_NumberOfBoards, @NumBoards, TAG_END]);
46
writeln('Looking through all boards installed for Picasso96');
48
for i := 0 to NumBoards-1 do begin
49
p96GetBoardDataTags(i,[P96BD_BoardName, @BoardName,
50
P96BD_RGBFormats, @RGBFormats,
51
P96BD_TotalMemory, @MemorySize,
52
P96BD_FreeMemory, @FreeMemory,
53
P96BD_LargestFreeMemory, @LargestFreeMemory,
54
P96BD_MemoryClock, @MemoryClock,
55
P96BD_MonitorSwitch, @MoniSwitch,
58
writeln('--------------------------------------------------');
59
printf('Board %ld: %s'#10,[ i, BoardName]);
60
printf('Total size of memory: %8ld'#10,[ MemorySize]);
61
printf('Size of free memory: %8ld'#10,[ FreeMemory]);
62
printf('Largest free chunk: %8ld'#10,[ LargestFreeMemory]);
63
printf('Monitor switch: %s'#10,[ GetMonitorValue(MoniSwitch)]);
64
writeln('This board supports:');
65
writeln(#9,'following rgb formats:');
67
if (RGBFormats and RGBFF_NONE) <> 0 then writeln(#9,#9,'PLANAR');
68
if (RGBFormats and RGBFF_CLUT) <> 0 then writeln(#9,#9,'CHUNKY');
69
if (RGBFormats and RGBFF_R5G5B5) <> 0 then writeln(#9,#9,'tR5G5B5');
70
if (RGBFormats and RGBFF_R5G5B5PC) <> 0 then writeln(#9,#9,'R5G5B5PC');
71
if (RGBFormats and RGBFF_B5G5R5PC) <> 0 then writeln(#9,#9,'B5G5R5PC');
72
if (RGBFormats and RGBFF_R5G6B5) <> 0 then writeln(#9,#9,'R5G6B5');
73
if (RGBFormats and RGBFF_R5G6B5PC) <> 0 then writeln(#9,#9,'R5G6B5PC');
74
if (RGBFormats and RGBFF_B5G6R5PC) <> 0 then writeln(#9,#9,'B5G6R5PC');
75
if (RGBFormats and RGBFF_R8G8B8) <> 0 then writeln(#9,#9,'R8G8B8');
76
if (RGBFormats and RGBFF_B8G8R8) <> 0 then writeln(#9,#9,'B8G8R8');
77
if (RGBFormats and RGBFF_A8R8G8B8) <> 0 then writeln(#9,#9,'A8R8G8B8');
78
if (RGBFormats and RGBFF_A8B8G8R8) <> 0 then writeln(#9,#9,'A8B8G8R8');
79
if (RGBFormats and RGBFF_R8G8B8A8) <> 0 then writeln(#9,#9,'R8G8B8A8');
80
if (RGBFormats and RGBFF_B8G8R8A8) <> 0 then writeln(#9,#9,'B8G8R8A8');
81
if (RGBFormats and RGBFF_Y4U2V2) <> 0 then writeln(#9,#9,'Y4U2V2');
82
if (RGBFormats and RGBFF_Y4U1V1) <> 0 then writeln(#9,#9,'Y4U1V1');
84
clock := (MemoryClock+50000) div 100000;
86
printf('memory clock set to %ld.%1ld MHz,'#10,[(clock div 10),(clock mod 10)]);