From e54e5b17fbf6c46094b729fb722ec1c949d38a45 Mon Sep 17 00:00:00 2001 From: Safiire Date: Sun, 15 Mar 2015 03:47:48 -0700 Subject: [PATCH] Still messing with the symbol names in neslib --- examples/demo.asm | 16 ++++++++-------- nes_lib/nes.sym | 8 +++++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/demo.asm b/examples/demo.asm index 4e250f4..6b6bf6e 100644 --- a/examples/demo.asm +++ b/examples/demo.asm @@ -175,8 +175,8 @@ .scope load_palette lda #$3F ldx #$00 - sta nes.vram.address2 - stx nes.vram.address2 + sta nes.vram.address + stx nes.vram.address loop: lda palette, x sta nes.vram.io @@ -198,9 +198,9 @@ lda #>bg sta $11 lda #$24 - sta nes.vram.address2 + sta nes.vram.address lda #$00 - sta nes.vram.address2 + sta nes.vram.address loop: lda ($10), y sta nes.vram.io @@ -324,16 +324,16 @@ reverse_dx: ; Scroll the screen if we have to scroll_screen: ldx #$00 ; Reset VRAM Address to $0000 - stx nes.vram.address2 - stx nes.vram.address2 + stx nes.vram.address + stx nes.vram.address ldx scroll zp ; Do we need to scroll at all? beq no_scroll dex stx scroll zp lda #$00 - sta nes.vram.address1 ; Write 0 for Horiz. Scroll value - stx nes.vram.address1 ; Write the value of 'scroll' for Vert. Scroll value + sta nes.ppu.scroll ; Write 0 for Horiz. Scroll value + stx nes.ppu.scroll ; Write the value of 'scroll' for Vert. Scroll value no_scroll: rts diff --git a/nes_lib/nes.sym b/nes_lib/nes.sym index 9deb4ef..7c722bb 100644 --- a/nes_lib/nes.sym +++ b/nes_lib/nes.sym @@ -16,17 +16,19 @@ .space control1 1 ; $2000 .space control2 1 ; $2001 .space status 1 ; $2002 + .org $2005 + .space scroll 1 ; $2005 . + .org $2003 .scope sprite .space address 1 ; $2003 .space io 1 ; $2004 .org $4014 .space dma 1 ; $4014 . + .org $2006 .scope vram - .org $2005 - .space address1 1 ; $2005 - .space address2 1 ; $2006 + .space address 1 ; $2006 .space io 1 ; $2007 .