Im wondering, if this is because what I have going on in my reset vector is too big?
This is my first time trying to setup a rom on my own from scratch. If I use an RTS at the end of my reset vector, the game will crash. But if end up using a JMP to where the NMI starts, my NMI code will run, but the NMI pointer is not logging, it's the IRQ pointer that is logging.
So am I only supposed to have a certain amount of code within the reset vector? I'm trying to prep a lot of stuff for the rom, but I'm assuming maybe it's too much?
The CPU Cycle in FCEUX says 235915 when I reach the end of what I have in my reset vector.
This is what I have...
This is my first time trying to setup a rom on my own from scratch. If I use an RTS at the end of my reset vector, the game will crash. But if end up using a JMP to where the NMI starts, my NMI code will run, but the NMI pointer is not logging, it's the IRQ pointer that is logging.
So am I only supposed to have a certain amount of code within the reset vector? I'm trying to prep a lot of stuff for the rom, but I'm assuming maybe it's too much?
Code:
SEI
CLD
LDA #$00
STA $2001
STA $2000
LDX #$FF
TXS
LDA $2002
AND #$80
BEQ $2002
LDA $2002
AND #$80
BEQ $2002
;it is at this point, where if I throw an rts here, the nmi will load up. but, if I continue to have large amounts of code to prep the rom, then use an rts, it doesn't work.
CLD
LDA #$00
STA $2001
STA $2000
LDX #$FF
TXS
LDA $2002
AND #$80
BEQ $2002
LDA $2002
AND #$80
BEQ $2002
;it is at this point, where if I throw an rts here, the nmi will load up. but, if I continue to have large amounts of code to prep the rom, then use an rts, it doesn't work.
The CPU Cycle in FCEUX says 235915 when I reach the end of what I have in my reset vector.
This is what I have...
Code:
01:FF00:78 SEI
01:FF01:D8 CLD
01:FF02:A9 00 LDA #$00
>01:FF04:8D 01 20 STA $2001 = #$00
01:FF07:8D 00 20 STA $2000 = #$00
01:FF0A:A2 FF LDX #$FF
01:FF0C:9A TXS
01:FF0D:AD 02 20 LDA $2002 = #$00
01:FF10:29 80 AND #$80
01:FF12:F0 F9 BEQ $FF0D
01:FF14:AD 02 20 LDA $2002 = #$00
01:FF17:29 80 AND #$80
01:FF19:F0 F9 BEQ $FF14
01:FF1B:A2 05 LDX #$05
01:FF1D:8E 00 80 STX $8000 = #$FF
01:FF20:BD F4 FF LDA $FFF4,X @ $FFF4 = #$00
01:FF23:8D 01 80 STA $8001 = #$FF
01:FF26:CA DEX
01:FF27:10 F4 BPL $FF1D
01:FF29:A9 7F LDA #$7F
01:FF2B:85 01 STA $0001 = #$00
01:FF2D:A9 00 LDA #$00
01:FF2F:91 00 STA ($00),Y @ $0000 = #$00
01:FF31:88 DEY
01:FF32:D0 F9 BNE $FF2D
01:FF34:C6 01 DEC $0001 = #$00
01:FF36:A5 01 LDA $0001 = #$00
01:FF38:C9 5F CMP #$5F
01:FF3A:D0 F1 BNE $FF2D
01:FF3C:A9 07 LDA #$07
01:FF3E:A0 FE LDY #$FE
01:FF40:85 01 STA $0001 = #$00
01:FF42:A9 00 LDA #$00
01:FF44:85 00 STA $0000 = #$00
01:FF46:A9 00 LDA #$00
01:FF48:91 00 STA ($00),Y @ $0000 = #$00
01:FF4A:88 DEY
01:FF4B:C0 FF CPY #$FF
01:FF4D:D0 F7 BNE $FF46
01:FF4F:C6 01 DEC $0001 = #$00
01:FF51:A5 01 LDA $0001 = #$00
01:FF53:C9 03 CMP #$03
01:FF55:B0 EF BCS $FF46
01:FF57:A2 FF LDX #$FF
01:FF59:A9 00 LDA #$00
01:FF5B:95 00 STA $00,X @ $0000 = #$00
01:FF5D:9D 00 02 STA $0200,X @ $0200 = #$00
01:FF60:CA DEX
01:FF61:D0 F6 BNE $FF59
01:FF63:A0 00 LDY #$00
01:FF65:A2 40 LDX #$40
01:FF67:A9 F8 LDA #$F8
01:FF69:99 00 02 STA $0200,Y @ $0200 = #$00
01:FF6C:C8 INY
01:FF6D:C8 INY
01:FF6E:C8 INY
01:FF6F:C8 INY
01:FF70:CA DEX
01:FF71:D0 F4 BNE $FF67
01:FF73:A9 00 LDA #$00
01:FF75:8D 00 A0 STA $A000 = #$02
01:FF78:A9 04 LDA #$04
01:FF7A:85 14 STA $0014 = #$FF
01:FF7C:A9 00 LDA #$00
01:FF7E:20 DA FF JSR $FFDA
01:FF81:20 80 A0 JSR $A080
01:FF84:A9 02 LDA #$02
01:FF86:85 14 STA $0014 = #$FF
;it is at this point, if I use a JMP to where my NMI starts, the code will run, but it's running as an IRQ, cause $FFFE-$FFFF is highlighted and not $FFFA-$FFFB.
01:FF01:D8 CLD
01:FF02:A9 00 LDA #$00
>01:FF04:8D 01 20 STA $2001 = #$00
01:FF07:8D 00 20 STA $2000 = #$00
01:FF0A:A2 FF LDX #$FF
01:FF0C:9A TXS
01:FF0D:AD 02 20 LDA $2002 = #$00
01:FF10:29 80 AND #$80
01:FF12:F0 F9 BEQ $FF0D
01:FF14:AD 02 20 LDA $2002 = #$00
01:FF17:29 80 AND #$80
01:FF19:F0 F9 BEQ $FF14
01:FF1B:A2 05 LDX #$05
01:FF1D:8E 00 80 STX $8000 = #$FF
01:FF20:BD F4 FF LDA $FFF4,X @ $FFF4 = #$00
01:FF23:8D 01 80 STA $8001 = #$FF
01:FF26:CA DEX
01:FF27:10 F4 BPL $FF1D
01:FF29:A9 7F LDA #$7F
01:FF2B:85 01 STA $0001 = #$00
01:FF2D:A9 00 LDA #$00
01:FF2F:91 00 STA ($00),Y @ $0000 = #$00
01:FF31:88 DEY
01:FF32:D0 F9 BNE $FF2D
01:FF34:C6 01 DEC $0001 = #$00
01:FF36:A5 01 LDA $0001 = #$00
01:FF38:C9 5F CMP #$5F
01:FF3A:D0 F1 BNE $FF2D
01:FF3C:A9 07 LDA #$07
01:FF3E:A0 FE LDY #$FE
01:FF40:85 01 STA $0001 = #$00
01:FF42:A9 00 LDA #$00
01:FF44:85 00 STA $0000 = #$00
01:FF46:A9 00 LDA #$00
01:FF48:91 00 STA ($00),Y @ $0000 = #$00
01:FF4A:88 DEY
01:FF4B:C0 FF CPY #$FF
01:FF4D:D0 F7 BNE $FF46
01:FF4F:C6 01 DEC $0001 = #$00
01:FF51:A5 01 LDA $0001 = #$00
01:FF53:C9 03 CMP #$03
01:FF55:B0 EF BCS $FF46
01:FF57:A2 FF LDX #$FF
01:FF59:A9 00 LDA #$00
01:FF5B:95 00 STA $00,X @ $0000 = #$00
01:FF5D:9D 00 02 STA $0200,X @ $0200 = #$00
01:FF60:CA DEX
01:FF61:D0 F6 BNE $FF59
01:FF63:A0 00 LDY #$00
01:FF65:A2 40 LDX #$40
01:FF67:A9 F8 LDA #$F8
01:FF69:99 00 02 STA $0200,Y @ $0200 = #$00
01:FF6C:C8 INY
01:FF6D:C8 INY
01:FF6E:C8 INY
01:FF6F:C8 INY
01:FF70:CA DEX
01:FF71:D0 F4 BNE $FF67
01:FF73:A9 00 LDA #$00
01:FF75:8D 00 A0 STA $A000 = #$02
01:FF78:A9 04 LDA #$04
01:FF7A:85 14 STA $0014 = #$FF
01:FF7C:A9 00 LDA #$00
01:FF7E:20 DA FF JSR $FFDA
01:FF81:20 80 A0 JSR $A080
01:FF84:A9 02 LDA #$02
01:FF86:85 14 STA $0014 = #$FF
;it is at this point, if I use a JMP to where my NMI starts, the code will run, but it's running as an IRQ, cause $FFFE-$FFFF is highlighted and not $FFFA-$FFFB.