1
0
mirror of https://github.com/safiire/n65.git synced 2024-06-02 05:41:36 +00:00

Organizing some of the files

This commit is contained in:
Safiire 2015-03-05 17:26:29 -08:00
parent dfb4410497
commit 4a7445c236
9 changed files with 2 additions and 77 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
demo.asm
*.nes
*.nes.yaml
.DS_Store

View File

@ -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.
![Scrolling NES Demo](assembler_demo.png)
![Scrolling NES Demo](github_images/assembler_demo.png)
Some Todos:
- Get an NSF file playing

View File

@ -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

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB