gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/libc/targets/z80/sms_refresh_oam.s
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
16 ld a, (_shadow_VDP_R5)
17 srl a
18 ld d, a
19 ld e, #0
20 VDP_WRITE_CMD d, e
21
22 ld h, #>_shadow_OAM
23 ld l, #0
24 ld c, #.VDP_DATA
25 ld b, #64
26 1$:
27 outi
28 jp nz, 1$
29
30 ld e, #0x80
31 VDP_WRITE_CMD d, e
32 ld b, #128
33 2$:
34 outi
35 jp nz, 2$
36
37 ENABLE_VBLANK_COPY ; switch OFF copy shadow SAT
38 ret
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.