nesdev.com
http://forums.nesdev.com/

ice climber (fds) strange emu behavior in later bonus stages
http://forums.nesdev.com/viewtopic.php?f=3&t=14992
Page 1 of 3

Author:  *Spitfire_NES* [ Thu Oct 27, 2016 12:43 pm ]
Post subject:  ice climber (fds) strange emu behavior in later bonus stages

I was recently watching videos on the fds version of ice climber and came across this video:

https://www.youtube.com/watch?v=bpC0V_G-mc4

Apparently, some emus, namely nestopia and virtuaNES exhibit some strange behavior in later bonus stages, (crashing on nestopia, cpu jam) sprite garbage with virtuaNES.

At around 35:42 the game starts glitching and the video uploader even makes a comment about it. Not sure if any other emus do this but figured id ask here as other emus could be having this issue. Why would re-using sprites on the bonus stages cause nestopia to crash?

Is this an emulator issue or something else with the game itself?

Author:  Hamtaro126 [ Sat Oct 29, 2016 9:10 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Could this be something similar to what happened to Kiki Kaikai - Doutou Hen?

In that sense, as far as I know according to the above link, the game itself could be the issue!

Author:  *Spitfire_NES* [ Mon Oct 31, 2016 6:32 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Do you mean where some files upon startup where missing? If that's the case, then why would the game jam up or crash or have garbled sprites after re-using the vegetable graphics?

Author:  Dwedit [ Mon Oct 31, 2016 10:14 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Ice Climber FDS loads the initial CHR RAM from a file, then overwrites the graphic for the vegetable with a new sprite every bonus stage. (Graphics data is stored in PRG-RAM at 613F, loaded from the disk and unchanged)
But that alone isn't enough to account for the game picking garbage data to write in there.

Edit: Set RAM address 0056 to 13 to get the last valid vegetable, then 14 to get the first glitch.

Author:  *Spitfire_NES* [ Tue Nov 01, 2016 1:36 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Thanks for the info Dwedit! So apparently it is a game bug then or is it something wrong with nestopia's fds emulation? (and virtuanes and others)

Author:  Dwedit [ Tue Nov 01, 2016 7:47 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Seems to be a game bug. $0056 is incremented at the end of every level (increments game difficulty and vegetable number), to a maximum value of 255.
When they multiply the level number by 2 and add to a pointer table to find the address of the vegetable graphics, they don't do any checks or limits there, so it reads garbage data as graphics.

Seems like they just didn't think you'd make it that far.

Author:  *Spitfire_NES* [ Wed Nov 02, 2016 1:21 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

thanks dwedit for the informative info and posts. So, is there any way to fix this through a bug fix patch or is out of the realm of possibility and too messsed up? Weird they thought we would never make it past a certain point. haha. :lol:

Author:  rainwarrior [ Wed Nov 02, 2016 1:32 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

*Spitfire_NES* wrote:
Weird they thought we would never make it past a certain point.

I thought that was shorthand for "nobody tested it that far before it shipped".

Author:  Dwedit [ Wed Nov 02, 2016 3:01 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Don't like the bug? ASM hack the code:
Code:
>  :6667:A5 56     LDA $0056 = #$00
<- Insert fix here: while A >= 0x14, subtract 0x14
   :6669:0A        ASL
   :666A:AA        TAX
   :666B:BD 3F 66  LDA $663F,X @ $663F = #$3F
   :666E:85 02     STA $0002 = #$2E
   :6670:BD 40 66  LDA $6640,X @ $6640 = #$61
   :6673:85 03     STA $0003 = #$61
   :6675:AD 02 20  LDA PPU_STATUS = #$00
   :6678:A5 10     LDA $0010 = #$1A
   :667A:29 FB     AND #$FB
   :667C:8D 00 20  STA PPU_CTRL = #$1A
   :667F:A9 05     LDA #$05
   :6681:8D 06 20  STA PPU_ADDRESS = #$18
   :6684:A9 20     LDA #$20
   :6686:8D 06 20  STA PPU_ADDRESS = #$18
   :6689:A0 00     LDY #$00
   :668B:B1 02     LDA ($02),Y @ $6132 = #$67
   :668D:8D 07 20  STA PPU_DATA = #$00
   :6690:C8        INY
   :6691:C0 40     CPY #$40
   :6693:D0 F6     BNE $668B
   :6695:60        RTS -----------------------------------------

Author:  *Spitfire_NES* [ Thu Nov 03, 2016 12:35 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

:mrgreen: Thanks for the info again dwedit. I have no idea how to code in assembly or what hack to even put in that place. Are there graphics that are supposed to be in place of the garbage graphics?

Perhaps someone who knows assembly could help here maybe. :D

Author:  oRBIT2002 [ Mon Nov 07, 2016 1:48 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Tried doing a fix for this, but FCEUX seems to ignore my breakpoints with FDS-games. :/

Author:  *Spitfire_NES* [ Tue Nov 08, 2016 4:18 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

oRBIT2002 wrote:
Tried doing a fix for this, but FCEUX seems to ignore my breakpoints with FDS-games. :/


What fix did you have in mind oRBIT? Also great work on all the patches you have done thus far! I hope a solution presents itself. :beer:

Was wondering exactly what kind of fix you had in mind?

Author:  rainwarrior [ Tue Nov 08, 2016 6:03 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

oRBIT2002 wrote:
Tried doing a fix for this, but FCEUX seems to ignore my breakpoints with FDS-games. :/

FCEUX breakpoints seem to work for me with FDS games. Can you give a specific example of the problem? If we can reproduce it, someone might be able to fix it.

Author:  oRBIT2002 [ Wed Nov 09, 2016 12:17 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

Perhaps I'm doing something wrong but I've played alot with the FCEUX debugger earlier..
I set a breakpoint at $6667 but it is never triggered.

Author:  oRBIT2002 [ Wed Nov 09, 2016 12:19 pm ]
Post subject:  Re: ice climber (fds) strange emu behavior in later bonus st

*Spitfire_NES* wrote:
oRBIT2002 wrote:
Tried doing a fix for this, but FCEUX seems to ignore my breakpoints with FDS-games. :/


What fix did you have in mind oRBIT? Also great work on all the patches you have done thus far! I hope a solution presents itself. :beer:

Was wondering exactly what kind of fix you had in mind?


The .fds could probably be patched with a fix quite easily (in theory), however FCEUX isn't cooperating at the moment..

Page 1 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/