It is currently Fri Nov 24, 2017 8:13 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 76 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Sun Sep 17, 2017 3:49 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 299
It seems like no emulator is able to run all 4 of these games at once without some sort of issue:
-Druid Kyoufu no Tobira (status bar flickers every other frame)
-Kaettekita Mario Bros (graphical glitches in disk insert prompt screen)
-Lutter (freezes after pressing any button once in game)
-Putt Putt Golf (no sound, buggy scrolling in-game)

Of all the emulators I've tested, there is always at least 1 game that fails (I may have missed some):
Bizhawk - Kaettekita Mario Bros
FCEUX - Druid Kyoufu no Tobira
Mesen - Putt Putt Golf
Nestopia UE - Druid Kyoufu No Tobira, Lutter
Nintaco - Kaettekita Mario Bros
Nintendulator - Kaettekita Mario Bros
puNES - Lutter, Putt Putt Golf

I haven't been able to find any way to keep all 4 games working at once.
All of these seem to be linked to the behavior of the IRQ reload value ($4020 & $4021) when the IRQ reload flag is disabled (bit 0 in $4022). When & under what conditions the reload value gets reset to 0 has an impact on these games - some appear to expect the reload value to be preserved after writes to $4022 or after an IRQ is triggered, while others expect the reload value to reset to 0 in similar conditions. I haven't managed to find any pattern that makes sense between all 4 games.

The Wiki doesn't seem to mention the reload flag in $4022, and I am not really aware of any other FDS documentation that does (other than emulator sources) - the other FDS documents listed in the old nesdev homepage don't mention the irq reload flag either. There is an older thread by FHorse about Kaettekita Mario Bros on here, but I haven't really been able to find any other information beyond that.

So... any ideas?


Top
 Profile  
 
PostPosted: Sun Sep 17, 2017 8:20 pm 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
my build nestopia,
-Druid Kyoufu no Tobira OK
-Kaettekita Mario Bros OK
-Lutter OK
-Putt Putt Golf no sound


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 7:21 am 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
if(_irqEnabled && !_irqReloadEnabled) {
//Needed by Kaettekita Mario Bros
//If done when _irqEnabled is false, Lutter breaks
if(_irqReloadValue & 0x0F)
_irqReloadValue = 0;
}


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 1:53 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 299
While that works (Kaettekita sets $6302 as the reload value, Putt Putt Golf uses $5400), it's essentially a patch on top of another patch (I'm fairly sure that the condition in Mesen's code that you modified here is incorrect, hardware-wise).

I'm mostly hoping to figure out how the FDS itself resets the value, since patches could just end up breaking any other FDS game.


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 3:26 pm 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
working nestopia for all irq fds.


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 3:33 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Sour wrote:
Of all the emulators I've tested, there is always at least 1 game that fails (I may have missed some):
(...)
So... any ideas?

Try my emulator RockNES and let me know.


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 5:42 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 299
Zepper wrote:
Try my emulator RockNES and let me know.
Same as Bizhawk, Nintendulator & Nintaco - 2 of the 3 random intro sequences to Kaettekita Mario Bros end with a glitchy disk switch message.

This is the behavior you get when you never reset the reload value to 0.
I guess only Kaettekita Mario Bros expects this to happen - maybe the actual issue is elsewhere.


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 6:35 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Sour wrote:
Zepper wrote:
Try my emulator RockNES and let me know.
Same as Bizhawk, Nintendulator & Nintaco - 2 of the 3 random intro sequences to Kaettekita Mario Bros end with a glitchy disk switch message.

This is the behavior you get when you never reset the reload value to 0.
I guess only Kaettekita Mario Bros expects this to happen - maybe the actual issue is elsewhere.

I don't know such game. Is it original or... an hack of the FDS SMB?


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 6:47 pm 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 299
It's a game made by Nintendo themselves: https://www.mariowiki.com/Kaettekita_Mario_Bros.


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 8:34 pm 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
Sour wrote:
Zepper wrote:
Try my emulator RockNES and let me know.
Same as Bizhawk, Nintendulator & Nintaco - 2 of the 3 random intro sequences to Kaettekita Mario Bros end with a glitchy disk switch message.

This is the behavior you get when you never reset the reload value to 0.
I guess only Kaettekita Mario Bros expects this to happen - maybe the actual issue is elsewhere.


Hardware not this bug.


Top
 Profile  
 
PostPosted: Mon Sep 18, 2017 8:39 pm 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
Zepper wrote:
Sour wrote:
Of all the emulators I've tested, there is always at least 1 game that fails (I may have missed some):
(...)
So... any ideas?

Try my emulator RockNES and let me know.

Attachment:
20170919113841.png
20170919113841.png [ 7.89 KiB | Viewed 714 times ]


Top
 Profile  
 
PostPosted: Tue Sep 19, 2017 1:12 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 882
Location: Sweden
The wiki page about FDS is lacking some information from Enri's page. Enri's page doesn't mention $4022.0 either though.

Quote:
$4022:(出力) [output]
 Bit2:1=IRQタイマカウント開始、0=IRQタイマカウント停止 [1=IRQ Timer Count Start, 0=IRQ Timer Count Stop]
Enri's page differs from the wiki on this matter: $4022.2 controls timer state according to Enri. I guess Enri is wrong in this case?


Top
 Profile  
 
PostPosted: Tue Sep 19, 2017 4:58 am 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 299
Pokun wrote:
Enri's page differs from the wiki on this matter: $4022.2 controls timer state according to Enri. I guess Enri is wrong in this case?
I'm guessing this is probably a typo and meant to say Bit 1 (as in the 2nd bit).

On the other hand, this reminded me that I hadn't checked another Japanese source of information - VirtuaNES. And after checking, it actually plays all 4 games properly :)
Its source code implies that bit 0 of $4022 is not an irq reload flag, it's an irq repeat flag.
If bit 0 is not set, the IRQ is supposed to trigger a single time, and then the irqEnabled flag is set to false (but its reload value is not altered). The IRQ's timer is always reloaded with the reload value once it triggers.
Using this logic makes all 4 games work *if* you also add logic to disable the "irqEnabled" flag when the game writes to $4023 with bit 0 (disk registers enabled) cleared (this is also from VirtuaNES' code). Otherwise Kaettekita Mario Bros crashes with an illegal opcode.

At the very least, this logic fixes the issues in Mesen too, and seems to make sense. (still need to try running other games to make sure this works properly, though)


Top
 Profile  
 
PostPosted: Tue Sep 19, 2017 8:22 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 882
Location: Sweden
I see, all these emulators got it wrong because there's little accurate information of the FDS (at least in English). I think a mending of the wiki is in order. And proper test disk images so the behaviour can be verified on real hardware and emulators alike.


Top
 Profile  
 
PostPosted: Tue Sep 19, 2017 2:01 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5838
Location: Canada
I'm assuming you've verified the behaviour of these 4 games against an actual FDS, but in case the hardware is scarce if you've got an FDS file you'd like tested I can do it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 76 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 8 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