Re: Demptronic NFL Football
Posted: Mon Feb 06, 2017 11:28 am
Extremely excited for this. Demo works great for me.
That's the version I have. What would cause it not to run in the latest version but still run in 2.2.2? Maybe something involving initialization or MMC5 maybe...?rainwarrior wrote:That doesn't change anything for me, in any of the emulators I just mentioned.
It does seem to run in an older version of FCEUX though. (2.2.2)
I've never used IRQs before. I just looked up on Nerdy Nights how to get a horizontal banner that doesn't scroll with the background. Not sure how to implement IRQs. Sounds like I should switch. I bet it would be easier to do other effects too. Any thoughts?lidnariq wrote:Briefly playing around with Mesen ....
You've somehow managed to spin, waiting for a sprite 0 hit in your NMI before you've successfully uploaded sprites the first time.
(Why are you using a sprite 0 hit on a mapper with IRQs?)
That's an easy fix. I also want to randomize the sprites selected during the spin move so spin moves look more realistic. Also, when a player jumps out of bounds, the ball needs to be placed where the ball was last in bounds, not where the player landed. I need to find a good football whistle sound so people know the play is dead. Should just use a quick tone for now. I have not implemented a ball yet so this is on the back burner for now. Each sprite will have an assumed placement of the ball at that moment so touchdowns are detected when the ball crosses the plain etc.FrankenGraphics wrote:Did a random button mashing/holding stress test. Holding a or b means retrigging their corresponding actions. Checking for a previously recorded release in order to re-perform the action may help against these odd-looking movement patterns.
It's basically just like the NMI handler, but rather than only happening at the very top of the frame, in the MMC5's case, you instead tell it to start an IRQ at scanline N. I'm not certain what a programmed value of "0" means here. It could mean the prerender scanline ... or it could mean something else.raydempsey wrote:I've never used IRQs before. [...] Not sure how to implement IRQs. Sounds like I should switch. I bet it would be easier to do other effects too. Any thoughts?
I am not familiar at all with working with IRQ's. All I know is they are interrupt requests and I think it's related to creating a stationary banner. Does anyone have some sample code and a little on how it's used?hackfresh wrote:If the wiki is right then
"
IRQ Counter ($5203) = All eight bits specify the scanline number to generate IRQ at
When the MMC5 detects a scanline, the following events occur:
if the In Frame signal is clear, set it, reset the IRQ counter to 0, and clear the IRQ Pending flag
otherwise, increment the IRQ counter. If it now equals the IRQ scanline ($5203), raise IRQ Pending flag
Note the above logic makes it impossible for an IRQ to occur when $5203 (IRQ counter) is set to $00"
I'm pretty sure when I did my MMC3 to MMC5 conversion I remember I had to change almost all the places where it was loading a 00 into the IRQ register into 01's.
Code: Select all
PHA
TXA
PHA
LDA $5204 ; acknowledge IRQ
LDA #0
STA $5204 ; MAYBE UNNECESSARY - disable IRQ so that it won't happen later unless it was re-enabled every vblank in the NMI)
LDA shadow_nametable
STA $2006
LDA shadow_Y
STA $2005
(insert some specific delay here so that the scroll split will happen at the right place on-screen)
LDX shadow_X
LDA shadow_last
STX $2005
STA $2006
PLA
TAX
PLA
RTI
Code: Select all
RESET
lda #3
sta $5100
lda #3
sta $5101 ; CHR mode 8 separate 1K banks
lda #1
sta $5104 ; extended RAM mode 1
lda #$F4
sta $5105 ; nametable mapping
lda #$80
sta $5114 ; bank 0 to $8000
lda #$81
sta $5115 ; bank 1 to $A000
lda #1
sta $5130
lda #$04
sta $5120 ; Sprite 0
lda #$00
sta $5121 ; Sprite 1 blank
sta $5122 ; Sprite 2 blank
lda #$14
sta $5123 ; Sprite 3
lda #0
sta $5130
lda #$1
sta $5203 ; IRQ counter
sei ; disable IRQs
cld ; disable decimal mode
ldx #$40
stx $4017 ; disable APU frame IRQ
ldx #$FF
txs ; Set up stack
inx
stx $2000 ; disable NMI
stx $2001 ; disable rendering
stx $4010 ; disable DMC IRQs
lda #%00011111
sta $4015
Code: Select all
lda #0
sta $2006
sta $2006
sta $2005
sta $2005
lda #%10010100
sta $2000
lda #%00011110
sta $2001
- lda $2002
and #%01000000
bne -
- lda $2002
and #%01000000
beq -
ldx #10
- dex
bne -
lda screen
clc
and #%00000001
adc #%10010100
sta $2000
lda scroll
sta $2005
lda #80
sta $2005
rts
Somewhere in your fixed bank, and the IRQ vector should point to it (next to the NMI and RESET vectors).raydempsey wrote:I've experimented with the code suggested by lidnariq but I'm not sure where to put it.
Code: Select all
VBlankFieldEnd
lda #31
sta $5203
lda #$80
sta $5204
lda screen
clc
and #%00000001
adc #%10010100
sta $2000
lda #%00011110
sta $2001
lda #0 ;<-------------------- A
sta $2005
lda #0 ;<-------------------- B
sta $2005
rts
Code: Select all
IRQ
pha
txa
pha
tya
pha
lda $5204
lda #0
sta $5204
lda #0 ;<--------------- C
sta $2006
lda #0 ;<--------------- D
sta $2005
ldy #10
- dey
bne -
lda #0 ;<--------------- E
sta $2005
lda #0 ;<--------------- F
sta $2006
pla
tay
pla
tax
pla
rti