News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Adventure Island 2 Hacking  (Read 4641 times)

Zynk

  • Hero Member
  • *****
  • Posts: 911
  • WIP Roll-chan: The Wily Wars
    • View Profile
Adventure Island 2 Hacking
« on: May 04, 2017, 10:25:01 pm »
I'm hacking this game for a while now, but I noticed that the Nessy animation has a flaw.

When facing right, you can see on the gif below that the player has a "bumpy" animation,


While facing left, the player doesn't have that motion.


The walking animation is alright, just the idle animation that has that problem.

I tried swapping the metatiles manually, but it affected the walking animation.

Maybe there's a way to control the sequence of the sprites?
« Last Edit: May 06, 2017, 12:31:26 am by Zynk Oxhyde »

nesrocks

  • Hero Member
  • *****
  • Posts: 608
    • View Profile
    • nesrocks.com
Re: Adventure Island Hacking
« Reply #1 on: May 05, 2017, 08:06:24 am »
Wow I never noticed this. Weird!
You should probably clarify it is adventure island 2 hacking in the thread title.

RadioTails

  • Sr. Member
  • ****
  • Posts: 338
  • Holding the Mega Drive controller
    • View Profile
Re: Adventure Island Hacking
« Reply #2 on: May 05, 2017, 10:12:18 am »
Looking at the tiles in the game, it loads a different set of tiles when turning left or right.  If you look at the RAM at 200, you can see which tiles get loaded: http://wiki.nesdev.com/w/index.php/PPU_OAM

Most likely the tiles to load for each side are grouped together.   
Avatar by LazyNinjartist

SpiderDave

  • Jr. Member
  • **
  • Posts: 46
    • View Profile
    • spiderdave.com
Re: Adventure Island Hacking
« Reply #3 on: May 05, 2017, 06:17:01 pm »
Found it.

add 0x10 for header
Change 0x1a734 from 40404141 ---> 3f3f4040



How I found it (for those who are curious):

In FCEUX I used cheat search to find the memory location for facing left or right, found it at 0x7b. 01=right, 02=left
In the debugger, set a read breakpoint on 7b

Stops in one spot:

>06:A405:A5 7B     LDA $007B = #$01 <-- load the player's current facing direction
 06:A407:C9 01     CMP #$01 <-- compare it with 01; Is the player facing right?
 06:A409:D0 03     BNE $A40E <-- if not, skip the next 3 bytes
 06:A40B:4C B0 A5  JMP $A5B0 <-- run this if player facing right
 06:A40E:4C F9 A5  JMP $A5F9  <--- run this if player facing left ** This is the spot we want to look into **
 06:A411:AD 10 06  LDA $0610 = #$4C
 06:A414:C9 10     CMP #$10
 06:A416:B0 01     BCS $A419
 
A short bit below A5F9 we have a bunch of "LDA, X" which is probably tables for srite stuff, so I do a "step into" until it hits one of them.
It runs the one at a638:

>06:A638:BD 34 A7  LDA $A734,X @ $A734 = #$3F
 06:A63B:8D 30 06  STA $0630 = #$3F   <--- this is where it sets the player's frame

Setting a new breakpoint for execute  on a638 we see that X goes from 0 to 3 so we know it's looping 4 bytes at a734.  If you hover over it in the debugger it gives the real address which is 1a744 (1a734 without header).

I found the right value for the frames by setting it manually using the cheat function, since we see it uses 0x0630 for the current frame.  I figured it was probably off by one, since it seems like a bug.
« Last Edit: May 05, 2017, 06:40:25 pm by SpiderDave »
My NES Tool: Davepatcher My SMB2 Hack WIP: Join Lamross in Hell

Zynk

  • Hero Member
  • *****
  • Posts: 911
  • WIP Roll-chan: The Wily Wars
    • View Profile
Re: Adventure Island 2 Hacking
« Reply #4 on: May 06, 2017, 12:32:24 am »
Found it.

add 0x10 for header
Change 0x1a734 from 40404141 ---> 3f3f4040
Thanks, SpiderDave! That worked :-*

You should probably clarify it is adventure island 2 hacking in the thread title.
I forgot the 2. But I might ask for help with 1, 3 and 4 someday.

Zynk

  • Hero Member
  • *****
  • Posts: 911
  • WIP Roll-chan: The Wily Wars
    • View Profile
Adventure Island 3 Hacking
« Reply #5 on: September 18, 2017, 10:20:28 pm »
Hello again. Need help with hacking the titlescreen of Adventure Island 3, I wanted to change the "HUDSON'S" on the title logo but the texts only changed the bottom texts. (see Image below)


Jorpho

  • Hero Member
  • *****
  • Posts: 4182
  • The cat screams with the voice of a man.
    • View Profile
Re: Adventure Island 2 Hacking
« Reply #6 on: September 18, 2017, 11:04:30 pm »
It seems likely the word "HUDSON'S" is stored as a bitmap along with the rest of the title screen.  Can you not find the tiles for the title screen?
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

Zynk

  • Hero Member
  • *****
  • Posts: 911
  • WIP Roll-chan: The Wily Wars
    • View Profile
Re: Adventure Island 2 Hacking
« Reply #7 on: September 19, 2017, 12:41:38 am »
It seems likely the word "HUDSON'S" is stored as a bitmap along with the rest of the title screen.  Can you not find the tiles for the title screen?
Thanks for the hint. Found it! Its arranged quite differently than what I was expecting.


para

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Adventure Island 2 Hacking
« Reply #8 on: September 19, 2017, 11:34:34 pm »
Good eye and nice of everyone to quickly find a fix for that.
What changes are you making to the game in your hack?

I'm also making a hack of Adventure Island but just the original game for now.