gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit bbc6375fe33a34a6b5b344101aac44efefc9005b parent 03613b5550ce741acb1f3307c4f17b9b86115645 Author: Michel Iwaniec <46843052+michel-iwaniec@users.noreply.github.com> Date: Tue, 22 Apr 2025 19:01:26 +0100 NES: Fix problem with screen being blank before first vsync() call (#765) NES: Fix problem with screen being blank before first vsync() call (#765) - Call .write_shadow_registers_to_buffer at reset, to initialize VBL buffer Diffstat:
| M | gbdk-lib/libc/targets/mos6502/nes/crt0.s | 3 | +++ |
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/gbdk-lib/libc/targets/mos6502/nes/crt0.s b/gbdk-lib/libc/targets/mos6502/nes/crt0.s @@ -714,6 +714,9 @@ __crt0_RESET_bankSwitchValue: lda #(PPUCTRL_NMI | PPUCTRL_SPR_CHR) sta *_shadow_PPUCTRL sta PPUCTRL + ; Prepare VBL buffer data (need to start at scanline -1 = SCREENHEIGHT-1 for correct Y scroll) + ldx #.SCREENHEIGHT-1 + jsr .write_shadow_registers_to_buffer ; Call main jsr _main ; main finished - loop forever
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.