@pictionary
You can test it with the following:
rem test 16 bit mode
rem by latch
rem 05/09/2007
set display mode 800,600,16
result=test_565_555()
select result
case -1 : print "Not 565 or 555" : endcase
case 0 : print "32 bit mode" : endcase
case 1 : print "16 bit 565 mode" : endcase
case 2 : print "16 bit 555 mode" : endcase
endselect
end
function test_565_555()
remstart
rem test 16 bit mode
rem by latch
rem 05/09/2007
return -1 if in neither 555 or 565 mode
return 0 is in 32 bit mode
return 1 if in 565 mode
return 2 if in 555 mode
remend
rem check screen depth
if screen depth()=32 then exitfunction 0
rem setup available objects
mem=1
while memblock exist(mem)
inc mem
endwhile
img=1
while image exist(img)
inc img
endwhile
rem clear screen and paint a green pixel
cls 0
ink rgb(0,255,0),0
dot 0,0
get image img,0,0,1,1
sync
rem make a memblock from the image
make memblock from image mem,img
rem check GREEN in the memblock to test the 16 bit mode
if memblock word(mem,12)=2016 then exitfunction 1 : rem 565 mode
if memblock word(mem,12)=992 then exitfunction 2 : rem 555 mode
rem cleanup
delete memblock mem
delete image img
endfunction -1
A memblock will hold the colors for whatever image you convert it from in whatever mode DBC is in. The colors will be in the format according to your device. Since the green bit length is what generally changes, you can test it against a full green pixel to see what it's value is. 5 set bits for green would look like
1111100000 = 992
6 set bits for green would look like
11111100000 = 2016
Enjoy your day.