A86: Grayscale
[Prev][Next][Index][Thread]
A86: Grayscale
I was working on a little grayscale program last night, but I was unable to
get it to display gray.
I used the following code ($E000 and $E400 are the 2 pics in my code)
Loop:
ld a,$20
out (0),a
;a whole bunch of nops - I tried anywhere from 0 to 100...
ld a,$24
out (0),a
;whole bunch more nops - same as above...
call _getkey
cp kExit
jr z,FixScreen
jr Loop
FixScreen:
ld a,$3C
out (0),a
ret
When I put pauses directly after each out (0),a, it switches the screen like
I want it to, but when I take out both pauses and use the above code, it just
shows one of them the whole time, until I hit escape...
Also, I tried loading the entire pic into vid mem (before I changed it) with
an ldir and it never worked... I used the following code:
ld hl,Pic0
ld de,$FC00
ld bc,1024
ldir
;.......
Pic0:
.db 0,0,0,0,0,0,0 ;1024 zeros with 4 1 bits in the middle...
;etc...
Anyone know why either of these didn't work?
~Steve