[BUG] Donkey Kong Country 2
Moderator: ZSNES Mods
[BUG] Donkey Kong Country 2
I have been playing with the Gameboy Advance version on this game and I have notice that the barrel rotation controls has a bug in the SNES version. I tried with Snes9X and it worked fine...
In ZSNES, those barrels won't stop to spin; it should spin manually.
In ZSNES, those barrels won't stop to spin; it should spin manually.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
I remember this bug was reported ~3 years back, and if I'm not mistaken, Overload said it was because we're not accessing a certain register correctly.pagefault wrote:This bug sucks. Mainly because I have no idea what could be causing it. Has it ever worked properly before?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
Re: [BUG] Donkey Kong Country 2
Off-topic, use this and enable the LCD colors filter, your eyes will thank you for it. (And it's handy to disable with games that were made before developers started compensating for the display's color range.)JAPPsmash wrote:I have been playing with the Gameboy Advance version on this game and I have notice that the barrel rotation controls has a bug in the SNES version. I tried with Snes9X and it worked fine...
In ZSNES, those barrels won't stop to spin; it should spin manually.
On-topic, this is a seriously lame bug. :[
pagefault knows this already (from IRC), but for the rest of you...
The problem is that the game reads an open bus register, at $2000-$2001, and expects certain bits to be set in the result. It only works on the real SNES accidentally, while zsnes returns 0 for these unmapped registers and breaks the game.
A quick fix would be to return 0x20 from both registers, since they're most likely to be accessed as "LDX $2000" (rather than say "LDA $002000" or "PEA $2000 / PLD / LDX $00"). A real fix would involve implementing open bus, at least for the commonest case of data reads like this (opcode fetch from open bus is much more involved and much less common).
BTW, history: This worked for a long time in snes9x due to an uninitialized stack variable. Then we started initializing it (to 0, like zsnes), and the game broke. Then we hacked it much as above, then we fixed it...
The problem is that the game reads an open bus register, at $2000-$2001, and expects certain bits to be set in the result. It only works on the real SNES accidentally, while zsnes returns 0 for these unmapped registers and breaks the game.
A quick fix would be to return 0x20 from both registers, since they're most likely to be accessed as "LDX $2000" (rather than say "LDA $002000" or "PEA $2000 / PLD / LDX $00"). A real fix would involve implementing open bus, at least for the commonest case of data reads like this (opcode fetch from open bus is much more involved and much less common).
BTW, history: This worked for a long time in snes9x due to an uninitialized stack variable. Then we started initializing it (to 0, like zsnes), and the game broke. Then we hacked it much as above, then we fixed it...
Coul this bug have something to do with control input detection routines
of the game.
Or the routine barrel start ->barrel spin ->barrel STOP doesn't work
properly with Zsnes...
of the game.
Or the routine barrel start ->barrel spin ->barrel STOP doesn't work
properly with Zsnes...
[url=http://zsnes.ipherswipsite.com/]Zsnes WIP[/url]
[url=http://byuu.cinnamonpirate.com/?page=bsnes]Bsnes[/url] by Byuu
[url=http://www.eidolons-inn.net/tiki-index.php?page=Kega]Kega Fusion[/url] by SteveSnake
[url=http://www.viceteam.org/]Vice[/url] by Viceteam
[url=http://byuu.cinnamonpirate.com/?page=bsnes]Bsnes[/url] by Byuu
[url=http://www.eidolons-inn.net/tiki-index.php?page=Kega]Kega Fusion[/url] by SteveSnake
[url=http://www.viceteam.org/]Vice[/url] by Viceteam
-
- Lurker
- Posts: 151
- Joined: Wed Oct 06, 2004 9:09 pm
- Location: Georgia, USA
- Contact:
sith-smasher: READ DAMNIT!anomie wrote:pagefault knows this already (from IRC), but for the rest of you...
The problem is that the game reads an open bus register, at $2000-$2001, and expects certain bits to be set in the result. It only works on the real SNES accidentally, while zsnes returns 0 for these unmapped registers and breaks the game.
A quick fix would be to return 0x20 from both registers, since they're most likely to be accessed as "LDX $2000" (rather than say "LDA $002000" or "PEA $2000 / PLD / LDX $00"). A real fix would involve implementing open bus, at least for the commonest case of data reads like this (opcode fetch from open bus is much more involved and much less common).
BTW, history: This worked for a long time in snes9x due to an uninitialized stack variable. Then we started initializing it (to 0, like zsnes), and the game broke. Then we hacked it much as above, then we fixed it...
Latest ZSNES release: [url=http://zsnes.ipherswipsite.com]ZSNES 11/12/06 WIP[/url]
Latest NSRT release: [url=http://nsrt.edgeemu.com/]NSRT 3.3 Final[/url]
Latest NSRT release: [url=http://nsrt.edgeemu.com/]NSRT 3.3 Final[/url]
oops,sorry
I just hope you won't be forced to rewrite too much to fix this bugger and
put it into oblivion soon
I just hope you won't be forced to rewrite too much to fix this bugger and
put it into oblivion soon
[url=http://zsnes.ipherswipsite.com/]Zsnes WIP[/url]
[url=http://byuu.cinnamonpirate.com/?page=bsnes]Bsnes[/url] by Byuu
[url=http://www.eidolons-inn.net/tiki-index.php?page=Kega]Kega Fusion[/url] by SteveSnake
[url=http://www.viceteam.org/]Vice[/url] by Viceteam
[url=http://byuu.cinnamonpirate.com/?page=bsnes]Bsnes[/url] by Byuu
[url=http://www.eidolons-inn.net/tiki-index.php?page=Kega]Kega Fusion[/url] by SteveSnake
[url=http://www.viceteam.org/]Vice[/url] by Viceteam
-
- New Member
- Posts: 4
- Joined: Sun Sep 09, 2012 3:21 am
Re: [BUG] Donkey Kong Country 2
Thanks for the explanation of the bug anomie, here's a simple patch that
implements the quick fix you suggested of returning 0x20 for registers at
addresses 0x2000 and 0x2001. The assembly really isn't all that scary, I'm not
sure why no one else has done this:
https://raw.github.com/DarkStarSword/ju ... ound.patch
I've just done a 102% playthrough of US v1.1 of this ROM and confirmed that it
behaves the same as my cartridge. This doesn't bother checking that the game is
DKC2, so it could possibly affect other games accessing those registers (but if
zsnes doesn't implement open bus properly they may not be expected to work
anyway).
Is anyone maintaining a stable branch for bug fixes while the dev's work on 2.0
behind closed doors?
implements the quick fix you suggested of returning 0x20 for registers at
addresses 0x2000 and 0x2001. The assembly really isn't all that scary, I'm not
sure why no one else has done this:
https://raw.github.com/DarkStarSword/ju ... ound.patch
I've just done a 102% playthrough of US v1.1 of this ROM and confirmed that it
behaves the same as my cartridge. This doesn't bother checking that the game is
DKC2, so it could possibly affect other games accessing those registers (but if
zsnes doesn't implement open bus properly they may not be expected to work
anyway).
Is anyone maintaining a stable branch for bug fixes while the dev's work on 2.0
behind closed doors?
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Re: [BUG] Donkey Kong Country 2
We're rewriting all that, so it's moot. :/
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- New Member
- Posts: 4
- Joined: Sun Sep 09, 2012 3:21 am
Re: [BUG] Donkey Kong Country 2
I know it's moot for the big 2.0 c++ rewrite, but that's not out yet, for
better or worse the SVN is closed to the public, and from what I gather it's
probably still a while away...
When it comes out that will be great, but In the meantime, is anyone
maintaining a stable/bug fix branch (or fork) based on the 1.52 code that could
take this?
better or worse the SVN is closed to the public, and from what I gather it's
probably still a while away...
When it comes out that will be great, but In the meantime, is anyone
maintaining a stable/bug fix branch (or fork) based on the 1.52 code that could
take this?
Re: [BUG] Donkey Kong Country 2
Most linux distributions maintain patch sets, but they probably don't cover the emulation core at all. Probably also patches specific to the SDL portions.
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae