git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit b947dd277e6d12b889112f1c8661941dc7ed314d
parent 0bff2fcdb83caaac7bebce7e69160642dfca7a8f
Author: Toxa <56631470+untoxa@users.noreply.github.com>
Date:   Sat, 16 Sep 2023 19:34:55 +0300

Merge pull request #579 from michel-iwaniec/clear_stackpage_at_reset

NES vram transfer buffer bugfix: Make sure to clear stack page on reset
Diffstat:
Mgbdk-lib/libc/targets/mos6502/nes/crt0.s8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gbdk-lib/libc/targets/mos6502/nes/crt0.s b/gbdk-lib/libc/targets/mos6502/nes/crt0.s @@ -342,12 +342,12 @@ __crt0_waitPPU_loop: bpl __crt0_waitPPU_loop rts -__crt0_clearRAM: +.macro CRT0_CLEAR_RAM ldx #0x00 txa __crt0_clearRAM_loop: sta 0x0000,x - ;sta 0x0100,x + sta 0x0100,x sta 0x0200,x sta 0x0300,x sta 0x0400,x @@ -356,7 +356,7 @@ __crt0_clearRAM_loop: sta 0x0700,x inx bne __crt0_clearRAM_loop - rts +.endm __crt0_clearVRAM: lda #0x00 @@ -400,7 +400,7 @@ __crt0_RESET_bankSwitchValue: jsr __crt0_waitPPU jsr __crt0_waitPPU ; Clear RAM and VRAM - jsr __crt0_clearRAM + CRT0_CLEAR_RAM jsr __crt0_clearVRAM ; Hide sprites in shadow OAM, and perform OAM DMA ldx #0

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.