Previous Thread
Next Thread
Print Thread
Page 80 of 120 1 2 78 79 80 81 82 119 120
byuu #60529 03/25/10 10:52 AM
Joined: Apr 2004
Posts: 1,563
Likes: 12
J
Very Senior Member
Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,563
Likes: 12
Originally Posted by byuu
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#p12961

So, 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:

Code
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? smirk

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)

judge #60531 03/25/10 12:33 PM
Joined: Mar 2001
Posts: 17,215
Likes: 234
R
Very Senior Member
Offline
Very Senior Member
R
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
J
Senior Member
Offline
Senior Member
J
Joined: Feb 2008
Posts: 106
Originally Posted by etabeta78
Originally Posted by JonasP
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 smile

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
Offline
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) smile

I hope to find the problem (and a fix)

Joined: Jun 2008
Posts: 205
B
Senior Member
Offline
Senior Member
B
Joined: Jun 2008
Posts: 205
EDIT: I figured it out. Solution is here:
http://board.byuu.org/viewtopic.php?p=12986#p12986

Basically, 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 smile

Last edited by byuu; 03/25/10 05:09 PM.
byuu #60545 03/25/10 07:11 PM
Joined: Mar 2006
Posts: 1,079
Likes: 6
L
Very Senior Member
Offline
Very Senior Member
L
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
S
Senior Member
Offline
Senior Member
S
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
B
Senior Member
Offline
Senior Member
B
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.zip

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

byuu #60559 03/26/10 02:49 PM
Joined: Mar 2001
Posts: 17,215
Likes: 234
R
Very Senior Member
Offline
Very Senior Member
R
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
Offline
Very Senior Member
Joined: Jan 2006
Posts: 3,691
Originally Posted by R. Belmont
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

Page 80 of 120 1 2 78 79 80 81 82 119 120

Link Copied to Clipboard
Who's Online Now
3 members (Dorando, Praxis, 1 invisible), 526 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,320
Posts121,930
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com