Here's some code i TRIED to put together by mashing up some things from JUNKDEMO.ASM from NESASM and some things i've learned from Assembly in One Step (6502guid.txt)...
It says corrupt file in Nestopia and does nothing in FCEUX, what's going on? Am i being an idiot?[/code]
Code:
.inesprg 1 ; One 16k prg bank
.ineschr 0 ; One 8k chr bank
.inesmir 1 ; Vertical map mirroring
.inesmap 0 ; Use mapper 0
.bank 0
.org $C000
reset:
lda #$1F ; Make all sound channels active, stolen from NESASM's JUNKDEMO...
sta $4015
lda #$0F ; See NES Document for register values and meaning
sta $4000 ; Square 1
sta $4004 ; Square 2
sta $4008 ; Triangle
lda #$00 ; See NES Document for register values and meaning
sta $4001 ; Square 1
sta $4005 ; Square 2
sta $4009 ; Triangle
ldx #$4F ;<Little tune, i think...
ldy #$A8 ;...>
lda #$00 ;<Get the joysticks ready, i think...
sta $4016 ;...
lda #$01 ;...
sta $4016 ;>
jsr cjs ;Calls cjs (Check JoyStick)
cjs:
sta $4016 ;Reads A (?)
bne lol ;If the result isn't zero jumps to lol (?)
lol:
stx $4006 ; Stolen from JUNKDEMO again.
sty $4007
rts
.ineschr 0 ; One 8k chr bank
.inesmir 1 ; Vertical map mirroring
.inesmap 0 ; Use mapper 0
.bank 0
.org $C000
reset:
lda #$1F ; Make all sound channels active, stolen from NESASM's JUNKDEMO...
sta $4015
lda #$0F ; See NES Document for register values and meaning
sta $4000 ; Square 1
sta $4004 ; Square 2
sta $4008 ; Triangle
lda #$00 ; See NES Document for register values and meaning
sta $4001 ; Square 1
sta $4005 ; Square 2
sta $4009 ; Triangle
ldx #$4F ;<Little tune, i think...
ldy #$A8 ;...>
lda #$00 ;<Get the joysticks ready, i think...
sta $4016 ;...
lda #$01 ;...
sta $4016 ;>
jsr cjs ;Calls cjs (Check JoyStick)
cjs:
sta $4016 ;Reads A (?)
bne lol ;If the result isn't zero jumps to lol (?)
lol:
stx $4006 ; Stolen from JUNKDEMO again.
sty $4007
rts
It says corrupt file in Nestopia and does nothing in FCEUX, what's going on? Am i being an idiot?[/code]