gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit bbfde1a7cd6eb70e978b9f7bb4f1f379a8a1cb7d parent a3f9fde586c6de3bbc8012a2d99442f3582745bd Author: Toxa <untoxa@mail.ru> Date: Sun, 5 Sep 2021 22:09:36 +0300 SMS/GG: clear VRAM in crt0 Diffstat:
| M | gbdk-lib/libc/targets/z80/crt0.s | 15 | +++++++++++++++ |
| M | gbdk-lib/libc/targets/z80/font.s | 8 | -------- |
| M | gbdk-lib/libc/targets/z80/putchar.s | 2 | -- |
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/gbdk-lib/libc/targets/z80/crt0.s b/gbdk-lib/libc/targets/z80/crt0.s @@ -98,6 +98,21 @@ _WRITE_VDP_DATA:: 4$: ld (#__SYSTEM), a + ld a, #<.VDP_VRAM + out (#.VDP_CMD), a + ld a, #>.VDP_VRAM + out (#.VDP_CMD), a + xor a + ld bc, #0x4101 + jr 6$ +5$: + out (.VDP_DATA), a +6$: + dec c + jr nz, 5$ + dec b + jr nz, 5$ + call _set_default_palette ei ; re-enable interrupts before going to main() diff --git a/gbdk-lib/libc/targets/z80/font.s b/gbdk-lib/libc/targets/z80/font.s @@ -4,7 +4,6 @@ .module FontUtils .globl .memset_small - .globl _cls .globl _font_ibm ; Structure offsets @@ -69,13 +68,6 @@ _font_init:: ld c, #(sfont_handle_sizeof*.MAX_FONTS) call .memset_small - ld a, #3 - ld (.fg_colour), a - xor a - ld (.bg_colour), a - - call _cls - ret _font_set:: diff --git a/gbdk-lib/libc/targets/z80/putchar.s b/gbdk-lib/libc/targets/z80/putchar.s @@ -4,7 +4,6 @@ .module putchar .globl font_current, font_set, font_load_ibm - .globl _cls .globl .scroll_viewport ; Structure offsets @@ -50,7 +49,6 @@ _putchar:: jr nz, 6$ push de - call _cls call font_load_ibm ld a, h or l
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.