ice climber (fds) strange emu behavior in later bonus stages

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: ice climber (fds) strange emu behavior in later bonus st

Post by Dwedit »

Try a read breakpoint at $56 instead.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: ice climber (fds) strange emu behavior in later bonus st

Post by rainwarrior »

oRBIT2002 wrote: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.
I can't find an FDS file for Ice Climber, but I can set execution breakpoints in the $6000-7FFF range and have them trigger for other FDS files.

Did you choose "execute" for the breakpoint type? A "read" type breakpoint will not trigger for an instruction read, it's only for reads that are the effective address of an instruction.

Also, it's easy to accidentally disable a breakpoint by double clicking on it. (There should be an E next to the breakpoint if it's enabled. There's a field of ------, might look like ECRWXF if all of the various breakpoint modes were active. E = enabled, C = CPU memory, R = read, W = write, X = execute, F = forbid.)
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: ice climber (fds) strange emu behavior in later bonus st

Post by oRBIT2002 »

I finally fixed this. I've uploaded an ips-patch to my website (check signature for URL). Thanks guys for finding this! This stuff is pretty entertaining to do.. :)
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: ice climber (fds) strange emu behavior in later bonus st

Post by *Spitfire_NES* »

Thanks for taking the time to fix this orbit! Im about to play it now. :) :mrgreen:
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: ice climber (fds) strange emu behavior in later bonus st

Post by oRBIT2002 »

Address $56 also seems to set the difficultylevel. At $13 it's pretty stressful. :) "Ice Climber" however will always have a special place in my heart, it was the first NES game I played back in the 80's.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: ice climber (fds) strange emu behavior in later bonus st

Post by Dwedit »

That fix is a difficulty level cap, not a graphics fix by itself.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: ice climber (fds) strange emu behavior in later bonus st

Post by *Spitfire_NES* »

Dwedit wrote:That fix is a difficulty level cap, not a graphics fix by itself.
Are you talking about the previous post dwedit or the patch on orbits site?
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: ice climber (fds) strange emu behavior in later bonus st

Post by Dwedit »

The patch on the site.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: ice climber (fds) strange emu behavior in later bonus st

Post by *Spitfire_NES* »

Dwedit wrote:The patch on the site.
Hmm i thought orbit fixed the sprite garbage? I'm currently testing the patch but have only gotten a few levels in. It says in his patch notes he fixed it. What does he need to do to fix the bug?
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: ice climber (fds) strange emu behavior in later bonus st

Post by Dwedit »

The patch does fix the sprite garbage, but due to the way it was implemented, puts a cap on the difficulty level. Same variable is used for difficulty level/flags and which vegetable appears.
My suggestion was to modify only the A register, as opposed to writing a smaller number back to the difficulty variable (which that patch does).
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: ice climber (fds) strange emu behavior in later bonus st

Post by oRBIT2002 »

Ah thanks Dwedit, I'll fix this!

EDIT:
Hm, what would the expected behaviour be for "bonusfruits" assuming address $56>=$14? Should they start over from $00?
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: ice climber (fds) strange emu behavior in later bonus st

Post by *Spitfire_NES* »

oRBIT2002 wrote:Ah thanks Dwedit, I'll fix this!

EDIT:
Hm, what would the expected behavior be for "bonusfruits" assuming address $56>=$14? Should they start over from $00?
Is there a way to make an option for differing difficulty settings if you can poke around with the values?

I was going to ask about the bonusfruits question you had. When the graphics were going into garbage sprites, were they trying to reset back to the first set of bonus fruit sprites? I hope im making sense, lol!
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: ice climber (fds) strange emu behavior in later bonus st

Post by Dwedit »

In the bugged FDS game, it wasn't trying to go back to any earlier bonus fruits, instead it was just going beyond the last one into garbage land.
The VS System version of the game properly wraps back to the first bonus fruit.

So the behavior should be MOD 0x14.

As in something like this:

-:
SEC
SBC #$14
BCC -
CLC
ADC #$14
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: ice climber (fds) strange emu behavior in later bonus st

Post by oRBIT2002 »

I can't get your example to work Dwedit. Perhaps it's because it's beginning to get late here in Sweden and I'm tired. :)
Anyway, my current code looks like this ("inserted" at $6667) but obviously it needs work assuming someone reaches a really high difficultlevel (not sure that's possible, I think there are checks for this so it can't continue to increment all the time).

Code: Select all

start:	lda $56
	cmp #$14
	bcc bonus_ok
	clc
	sbc #$13

bonus_ok:	
        asl
	jmp $666a
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: ice climber (fds) strange emu behavior in later bonus st

Post by *Spitfire_NES* »

Thanks for your continued work orbit! Were you able to work past the issue you were having last night?
Post Reply