From 6ae9e74d5b9e8cc69c33b7f707399b69632026d9 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 26 May 2016 11:08:05 +0100 Subject: Added extra NES ROM options. --- src/example/nes.asm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/example/nes.asm') diff --git a/src/example/nes.asm b/src/example/nes.asm index 8228914..4598a41 100644 --- a/src/example/nes.asm +++ b/src/example/nes.asm @@ -6,6 +6,7 @@ option nes-vector,reset,start option nes-vector,nmi,nmi option nes-vector,brk,nmi + option nes-mirror,horizontal vsync: macro .wait @@ -15,18 +16,27 @@ vsync: macro start: org $c000 - sei + ; Clear decimal and setup stack + ; cld ldx #$ff txs - ; this sets up the PPU. Apparently. + ; Wait for the PPU. Recommended practice is clear the flag, and + ; wait for 2 VBL signals + ; + bit $2002 + vsync + vsync + + ; Setup PPU + ; lda #%00001000 sta $2000 lda #%00011110 sta $2001 - ; Set PPU to palette + ; Setup the palette ; loadpalette: lda #$3f @@ -34,8 +44,6 @@ loadpalette: lda #$00 sta $2006 - ; Load the palette - ; ldx #0 .loop lda palette,x sta $2007 @@ -52,7 +60,7 @@ loadpalette: load_namemap: lda #$20 sta $2006 - lda #$20 + lda #$40 sta $2006 ldx #0 -- cgit v1.2.3