|
Joined: Apr 2004
Posts: 1,563 Likes: 12
Very Senior Member
|
Very Senior Member
Joined: Apr 2004
Posts: 1,563 Likes: 12 |
I've mostly cracked Speedy Gonzales. It seems that under certain circumstances, it's possible to glitch the S-CPU MDR to feed back 0x00 instead of the actual MDR. Speedy gets stuck in a loop for several hundred iterations fetching $1818, until eventually it gets $1800 and breaks out (by extreme luck and through multiple nested convolutions. This was definitely a bug in the game and not intentional.) Logged hardware results and test source code here: http://board.byuu.org/viewtopic.php?p=12961#p12961So, you guys are the most pedantic about emulation authenticity (not a bad thing!) ... we can't emulate this. The glitch occurs completely randomly and unpredictably. The closest we can do is simulate it with a pseudo-random number generator, eg: uint8_t CPU::getMDR() const {
return (prng() % 255) ? regs.mdr : 0x00;
} What would, or rather, what are, you guys going to do for this case? I find it hard to believe that it would be truly random (or random all the time). I'd expect there to be some special case that's triggering this. Is the test done using the same screen parameters (possibly even contents) as the place of the bug? Or maybe sound? Are irqs enabled? (fyi, I know nothing about snes hardware)
|
|
|
|
Joined: Mar 2001
Posts: 17,215 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,215 Likes: 234 |
Yeah, this has got to be some kind of DMA/IRQ/who knows what interaction. Lots of other games would break if that readback really did randomly screw up.
ETA: does this game work on the later "slimline" SNES with the revised less-buggy chipset?
Last edited by R. Belmont; 03/25/10 01:25 PM.
|
|
|
|
Joined: Feb 2008
Posts: 106
Senior Member
|
Senior Member
Joined: Feb 2008
Posts: 106 |
With the latest updates (great work!) the only remaining issue in DKC3 is the scrambled text in Swanky's side show. could you provide an .inp file from the start to a Swanky show? remember to either delete .nv or to include it together with the inp file. thanks in advance I can provide the .nv-file here. Just walk to the red and white tent and enter Swanky's show. The ROM used is the NTSC version verified with no-intro. NVRAM: http://www.megaupload.com/?d=5Y7V67R2
|
|
|
|
Joined: Jan 2006
Posts: 3,691
Very Senior Member
|
Very Senior Member
Joined: Jan 2006
Posts: 3,691 |
thanks. it saves me a lot of time (especially because my eeepc cannot run snes at 100% speed) I hope to find the problem (and a fix)
|
|
|
|
Joined: Jun 2008
Posts: 205
Senior Member
|
Senior Member
Joined: Jun 2008
Posts: 205 |
EDIT: I figured it out. Solution is here: http://board.byuu.org/viewtopic.php?p=12986#p12986Basically, when NMI triggers (on the bus cycle edge), it clears the S-CPU Memory Data Register. As the game loops while reading 16-bits, eventually an NMI triggers on the opcode edge after lda $185d,x [x=181a, effective=3077]; which turns $1818 into $0018. And that value magically gets the loop to break. By observing the number of loop iterations needed to break out, it appears to match hardware very closely. Obviously it's not exact since the counters aren't aligned when you hit the button. I will write a proper proof ROM later tonight to verify it 100%, but I'm pretty confident that we have this one cracked now. Unfortunately this test is going to require clock-perfect S-CPU timing, but at least seeing it pass/fail on hardware, you can implement it in MESS
Last edited by byuu; 03/25/10 05:09 PM.
|
|
|
|
Joined: Mar 2006
Posts: 1,079 Likes: 6
Very Senior Member
|
Very Senior Member
Joined: Mar 2006
Posts: 1,079 Likes: 6 |
ah, gotta love game bugs like this which accidentally abuse hardware.
LN
"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
|
|
|
|
Joined: Mar 2010
Posts: 155 Likes: 1
Senior Member
|
Senior Member
Joined: Mar 2010
Posts: 155 Likes: 1 |
Just noticed an odd issue with the KO countdown timer in Super Punch-Out and 0.137. The left half of the timer number is diplayed on the far left side; while the right half is on the far right. The number should appear in the center of the screen (as it does in bsnes and real hw).
It's easy enough to replicate - just start the game and wait about 3-5 minutes through the attract mode/demo. Eventually the timer will appear.
|
|
|
|
Joined: Jun 2008
Posts: 205
Senior Member
|
Senior Member
Joined: Jun 2008
Posts: 205 |
Side note: verified that the Speedy Gonzales thing is actually DMA and HDMA updating the MDR, not NMI as first suspected. http://byuu.org/temp/test_mdrhdma.zipIt brings up entirely new problems by exposing that HDMA is asserting MDR after an opcode's read cycle from which the HDMA triggers; which is going to require a ground-up rethink of the MDR and HDMA sync subsystems. But anyway for right now, even without that, just let H/DMA update the MDR and Speedy will work.
|
|
|
|
Joined: Mar 2001
Posts: 17,215 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,215 Likes: 234 |
Also the crap hack "Sonic on SNES" game that was based on Speedy. (That was way more interesting back before Sega started releasing 4 games a year featuring Sonic on Nintendo hardware).
Is this "ground up rethink" going to require major changes to your S-CPU? I want to know when it's safe to port, because I was gonna do it this weekend. That obviously would be dumb if it's gonna be in serious flux though.
|
|
|
|
Joined: Jan 2006
Posts: 3,691
Very Senior Member
|
Very Senior Member
Joined: Jan 2006
Posts: 3,691 |
Is this "ground up rethink" going to require major changes to your S-CPU? I want to know when it's safe to port, because I was gonna do it this weekend. That obviously would be dumb if it's gonna be in serious flux though. I guess it's impossible to say it in advance: http://board.byuu.org/viewtopic.php?f=16&t=614
|
|
|
3 members (Dorando, Praxis, 1 invisible),
526
guests, and
1
robot. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,320
Posts121,930
Members5,074
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|