It is currently Fri Jun 23, 2017 10:12 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 102 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
Author Message
PostPosted: Mon Feb 06, 2017 11:28 am 
Offline

Joined: Sat Feb 21, 2009 12:45 pm
Posts: 8
Extremely excited for this. Demo works great for me. :)


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 11:59 am 
Offline
User avatar

Joined: Sat May 31, 2014 4:12 pm
Posts: 134
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)


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...?


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 12:15 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5306
Location: Canada
It seems to run on 2.2.3 if I switch to "Old PPU".

The new PPU is supposed to be much more accurate, but I'm not sure specifically in what ways.

The default setting is old PPU, but I think it's mainly that way to provide support for legacy TAS etc. that relies on its behaviour. If you're trying to develop new software, you would probably want to use new PPU.


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 12:28 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5833
Location: Seattle
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?)


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 12:47 pm 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 512
Location: Gothenburg, Sweden
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.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 4:38 pm 
Offline
User avatar

Joined: Sat May 31, 2014 4:12 pm
Posts: 134
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?)


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?


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 4:50 pm 
Offline
User avatar

Joined: Sat May 31, 2014 4:12 pm
Posts: 134
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.


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.

I've spent so much energy on field logos and helmets that I'm excited to get back to programming football physics.


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 6:34 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5833
Location: Seattle
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?
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.

You also need to explicitly acknowledge the IRQ source in the IRQ handler (i.e. read $5204), whereas NMIs don't need to be.

(As contrast, the MMC3 starts an IRQ after N scanlines have passed)


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 8:54 am 
Offline
User avatar

Joined: Sat Mar 30, 2013 12:24 am
Posts: 225
It's looking good. I especially like the sprite animation. However, the text at the top would definitely be (at least partially) cropped on my old CRT.

_________________
www.mteegfx.com


Top
 Profile  
 
PostPosted: Tue Feb 07, 2017 11:19 am 
Offline

Joined: Sun May 03, 2015 8:19 pm
Posts: 86
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.


Top
 Profile  
 
PostPosted: Wed Feb 08, 2017 2:22 pm 
Offline
User avatar

Joined: Sat May 31, 2014 4:12 pm
Posts: 134
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.


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?


Top
 Profile  
 
PostPosted: Wed Feb 08, 2017 2:37 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5833
Location: Seattle
For your purposes, I think you should just be able to have an IRQ that does something like
Code:
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


In your main thread, make sure you've disabled other sources of IRQs (APU frame counter and DMC completion), told the 6502 to listen to IRQs (CLI), and in your NMI, tell the MMC5 to start the IRQ at the right scanline (LDA #something / STA $5203) and tell the MMC5 to enable IRQs (LDA #$80 / STA $5204)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 102 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group