From 4a7445c236540499a45c031cb4ef7de451a9dd14 Mon Sep 17 00:00:00 2001 From: Safiire <safiire@gmail.com> Date: Thu, 5 Mar 2015 17:26:29 -0800 Subject: [PATCH] Organizing some of the files --- .gitignore | 1 + README.md | 2 +- background.asm | 76 ------------------ beep.asm => examples/beep.asm | 0 demo.asm => examples/demo.asm | 0 .../my_background.asm | 0 noise.asm => examples/noise.asm | 0 scope.asm => examples/scope.asm | 0 .../assembler_demo.png | Bin 9 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 background.asm rename beep.asm => examples/beep.asm (100%) rename demo.asm => examples/demo.asm (100%) rename my_background.asm => examples/my_background.asm (100%) rename noise.asm => examples/noise.asm (100%) rename scope.asm => examples/scope.asm (100%) rename assembler_demo.png => github_images/assembler_demo.png (100%) diff --git a/.gitignore b/.gitignore index a98e109..babecd0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +demo.asm *.nes *.nes.yaml .DS_Store diff --git a/README.md b/README.md index fdb2b5a..879c5b5 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ An NES assembler for the 6502 microprocessor written in Ruby There is an example file included (shown below) that is a modified port of the NES101 tutorial by Michael Martin. -  +  Some Todos: - Get an NSF file playing diff --git a/background.asm b/background.asm deleted file mode 100644 index de381e9..0000000 --- a/background.asm +++ /dev/null @@ -1,76 +0,0 @@ - .inesprg 1 ; 1x 16KB PRG code - .ineschr 1 ; 1x 8KB CHR data - .inesmap 0 ; mapper 0 = NROM, no bank swapping - .inesmir 1 ; background mirroring - - -;;;;;;;;;;;;;;; - - - .bank 0 - .org $C000 -RESET: - SEI ; disable IRQs - CLD ; disable decimal mode - LDX #$40 - STX $4017 ; disable APU frame IRQ - LDX #$FF - TXS ; Set up stack - INX ; now X = 0 - STX $2000 ; disable NMI - STX $2001 ; disable rendering - STX $4010 ; disable DMC IRQs - -vblankwait1: ; First wait for vblank to make sure PPU is ready - BIT $2002 - BPL vblankwait1 - -clrmem: - LDA #$00 - STA $0000, x - STA $0100, x - STA $0200, x - STA $0400, x - STA $0500, x - STA $0600, x - STA $0700, x - LDA #$FE - STA $0300, x - INX - BNE clrmem - -vblankwait2: ; Second wait for vblank, PPU is ready after this - BIT $2002 - BPL vblankwait2 - - - LDA #%10000000 ;intensify blues - STA $2001 - -Forever: - JMP Forever ;jump back to Forever, infinite loop - - - -NMI: - RTI - -;;;;;;;;;;;;;; - - - - .bank 1 - .org $FFFA ;first of the three vectors starts here - .dw NMI ;when an NMI happens (once per frame if enabled) the - ;processor will jump to the label NMI: - .dw RESET ;when the processor first turns on or is reset, it will jump - ;to the label RESET: - .dw 0 ;external interrupt IRQ is not used in this tutorial - - -;;;;;;;;;;;;;; - - - .bank 2 - .org $0000 - .incbin "mario.chr" ;includes 8KB graphics file from SMB1 \ No newline at end of file diff --git a/beep.asm b/examples/beep.asm similarity index 100% rename from beep.asm rename to examples/beep.asm diff --git a/demo.asm b/examples/demo.asm similarity index 100% rename from demo.asm rename to examples/demo.asm diff --git a/my_background.asm b/examples/my_background.asm similarity index 100% rename from my_background.asm rename to examples/my_background.asm diff --git a/noise.asm b/examples/noise.asm similarity index 100% rename from noise.asm rename to examples/noise.asm diff --git a/scope.asm b/examples/scope.asm similarity index 100% rename from scope.asm rename to examples/scope.asm diff --git a/assembler_demo.png b/github_images/assembler_demo.png similarity index 100% rename from assembler_demo.png rename to github_images/assembler_demo.png