It turned out to be me setting IY without saving the old value.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
call SJQ_setgraphics
loop:
; Simple buffer cleaning, sets everything to 0.
ld HL, (SJQ_curbuf)
ld (HL), 0
ld DE, (SJQ_curbuf)
inc DE
ld BC, 320 * 240 - 1
ldir
; do some more drawing here.
call SJQ_bufswap
SJQ_setgraphics:
; Sets the palette.
ld HL, SJQ_PALETTE
ld DE, $E30200
ld BC, SJQ_PALETTE_END - SJQ_PALETTE
ldir
; Enables 8bpp.
ld A, $27
ld ($E30018), A
; Sets up double buffering.
ld HL, vRam
ld (mpLcdBase), HL
ld hl, vRam + 320 * 240
ld (SJQ_curbuf), HL
ld HL, mpLcdImsc
ld (HL), 4
ret
SJQ_bufswap:
ld HL, (SJQ_curbuf)
ld DE, (mpLcdBase)
ld (SJQ_curbuf), DE
ld (mpLcdBase), HL
_:
ld HL, mpLcdIcr
set 2, (HL)
ld HL, mpLcdRis
_:
bit 2, (HL)
jr Z, -_
ret
Page created in 0.036 seconds with 31 queries.