It's well known that when reading LCD data from port $11, you have to do an extra "dummy read" first before you can start getting the actual data you want. Emulators just return 0 for this dummy read (or 17 on wabbitemu). But on my calc I've found I can get it to return any value I want. It looks like the dummy read is, to the LCD driver, just like any other read - but whenever you read from port $11, it reads from the current coordinates, but returns the value of the
previous read.
Here's the program I used for testing. It displays 170 ($AA) on a real TI-83+.
Code: Select all
di
b_call($42B5) ; set X-increment mode
call top
ld a,$aa
out ($11),a
call top
in a,($11) ; reads $aa, sends previous read to CPU
call top
ld a,$ff
out ($11),a
call top
in a,($11) ; reads $ff, sends $aa to CPU
ld h,0
ld l,a
b_call(_DispHL)
ei
ret
top: call $000b
ld a,$20
call $+5
ld a,$80
out ($10),a
jp $000b