git.y1.nz

gbdk-2020

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

commit f5d12b3ac77e98604987bcabba4ee1d418efa2e8
parent 5b401021fa12843f09e1bfb7882736fd44543f85
Author: Michel Iwaniec <46843052+michel-iwaniec@users.noreply.github.com>
Date:   Thu, 30 May 2024 23:13:12 +0100

NES: Add simulated increment of _bkg_scroll_y between calls to LCD isr, in case isr does not re-write it (#684)


Diffstat:
Mgbdk-lib/libc/targets/mos6502/nes/crt0.s4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/gbdk-lib/libc/targets/mos6502/nes/crt0.s b/gbdk-lib/libc/targets/mos6502/nes/crt0.s @@ -456,6 +456,10 @@ _vsync:: clc ; -1 to compensate for LCD PPU write taking up a scanline on its own sbc *.lcd_scanline_previous sta __lcd_isr_delay_num_scanlines,y + ; Add number of delayed scanlines to _bkg_scroll_y to simulate PPU increment + clc + adc *_bkg_scroll_y + sta *_bkg_scroll_y ; Call LCD isr jsr .jmp_to_LCD_isr ; Copy shadow registers

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