Hi all,
I am looking at the following GPL code snippet in GROM 0 as part of power-up/reset (re-produced from TI-intern):
00B5 : CLR VDP@>0000 Check VDP RAM 00B8 : ST @>8370,>10 00BB : ST VDP*>8370,>A0 00BF : CZ VDP@>0000 00C2 : BR GROM@>00D9 00C4 : MOVE >0001 TO REG>01 FROM GROM@>044C 00CA : CLR VDP*>8370 00CD : ADD @>8370,@>8370 4, 8 or 16K? 00D0 : CEQ @>8370,>40 00D3 : BR GROM@>00BB 00D5 : ST @>83FD,>08 System flags (16k flag) 00D9 : DDEC @>8370 Pointer end VDP RAM 00DB : MOVE >0001 TO REG>01 FROM GROM@>0241 00E1 : CLR VDP@>0000
It's meant to check and set the amount of VDP RAM. But shouldn't the check at >00BF be "CZ VDP@*>8370" to see if the value written initially (>A0) is read back and thus RAM is present? The loop just seems to run until >8370 contains >4000 (16K RAM) while needlessly checking VDP RAM >0000.
Also I don't get the statement at >00DB which seems to write a value to VDP REG1 from a rather random GROM address, compared to the code at >00C4 which does it properly.
I am probably missing a thing or 2 :-)
Thanks!
John