sms_refresh_oam.s (632B)
1 .include "global.s" 2 3 .title "VRAM utilities" 4 .module VRAMUtils 5 6 .globl __shadow_OAM_base 7 8 .ez80 9 10 .area _HOME 11 12; void refresh_OAM(); 13_refresh_OAM:: 14 DISABLE_VBLANK_COPY ; switch OFF copy shadow SAT 15 ld de, #.VDP_SAT 16 VDP_WRITE_CMD d, e 17 18 ld h, #>_shadow_OAM 19 ld l, #0 20 ld c, #.VDP_DATA 21 ld b, #64 221$: 23 outi 24 jp nz, 1$ 25 26 ld de, #(.VDP_SAT + 0x80) 27 VDP_WRITE_CMD d, e 28 ld b, #128 292$: 30 outi 31 jp nz, 2$ 32 33 ENABLE_VBLANK_COPY ; switch OFF copy shadow SAT 34 ret