This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Gameplay-hacking Aladdin

Gameplay-hacking Aladdin
by on (#134869)
While graphics hacking Aladdin (this game), I decided to split the project into two hacks: gameplay and graphics.

But before getting started, I'd first like to know which version of the game I have. I can't find it anywhere.

It seems to be this one:

• 1995 Copyright
• no weird number designations in the title
• music plays normally throughout the game

Anyway, gameplay mechanics I'd like to fix are:

• switch A & B buttons
• change running physics
• 'rug-gliding' speed (the way it works in this game makes it almost entirely useless)
Re: Gameplay-hacking Aladdin
by on (#134870)
How about just posting a MD5 checksum of the ROM? Somebody can probably try to hunt it down then.
Re: Gameplay-hacking Aladdin
by on (#134872)
Because... I don't know what an MD5 checksum is. :(

And I think I may have overwritten my rom. Image
Re: Gameplay-hacking Aladdin
by on (#134880)
Use the Google.
Re: Gameplay-hacking Aladdin
by on (#134882)
Jedi QuestMaster wrote:
And I think I may have overwritten my rom. Image

How are you making IPS patches then? o_O (you need the original ROM to base the patch on)
Re: Gameplay-hacking Aladdin
by on (#134886)
Apparently the different dumps are so similar that an IPS patch to one applies cleanly to the others. It's like Game Genie codes that work on more than one revision of a ROM.
Re: Gameplay-hacking Aladdin
by on (#134887)
Sik wrote:
How are you making IPS patches then? o_O (you need the original ROM to base the patch on)

I haven't made an ips file since this screw up. So for now I'm good. 8-)

By the way, I think FARID found what I'm looking for: Aladdin (Unl) [p1][hM04].nes

Edit: The exact one I was using is Aladdin (E) [p1][hM04], and the only difference between this and the (Unl) one is byte 06, which reads '40' on the (Unl) one and '41' on the (E) version.

By the way, what does [p1] mean? I assumed it meant 'pirate' but wouldn't that only be used if the game is further pirated from its original state? :?
Re: Gameplay-hacking Aladdin
by on (#134919)
The original game wasn't MMC3.
Re: Gameplay-hacking Aladdin
by on (#134971)
This one is hacked to mapper 4. But what was the original?

Would a graphics patch not work correctly for both? I do recall reading that there's a graphical glitch on the ending screen due to this.
Re: Gameplay-hacking Aladdin
by on (#134974)
I imagine the original was a custom mapper.
Re: Gameplay-hacking Aladdin
by on (#134977)
Or maybe that crazy Mapper 90.
Re: Gameplay-hacking Aladdin
by on (#134982)
Yeah, it was mapper 90.
Re: Gameplay-hacking Aladdin
by on (#134987)
Speaking of gameplay hacking, the game can and will freeze under varying conditions. Once I managed to jump down, following a path of gems into the area where the snakes pop up, and the game froze. I also jumped on one of the enemies while I was close to a wall, and Aladdin jumped in a wall and crashed the game.

These were observed in FCEUX, so no telling if it's the emulator or the game doing it.
Re: Gameplay-hacking Aladdin
by on (#135036)
So I assume the mirroring values are arbitrary because there's absolutely nothing else different between the two roms.

OneCrudeDude wrote:
Speaking of gameplay hacking, the game can and will freeze under varying conditions. Once I managed to jump down, following a path of gems into the area where the snakes pop up, and the game froze. I also jumped on one of the enemies while I was close to a wall, and Aladdin jumped in a wall and crashed the game.

These were observed in FCEUX, so no telling if it's the emulator or the game doing it.

Either way, it'd be a good idea to playtest this on real hardware. I've noticed the game freeze a couple of times. Once on the Genie's lamp stage. I think it may have had to do with the enemies on screen.

By the way. I know jack about hacking buttons. How would I go about this? So far I've found that changing address 03D0A5 from 80 to 40 makes the 'B' button throw apples, but not while he's running.
Re: Gameplay-hacking Aladdin
by on (#135038)
That probably means the game has a different check for throwing apples while running. Yeah, there isn't much more to it, just keep looking around.

The game is storing the controller input in some byte in RAM then checking it afterwards, right? If so, just look for places in the code that attempt to access that byte. Not sure how easy you have that though, but it'll most likely show you all of the code accessing the controller.
Re: Gameplay-hacking Aladdin
by on (#135067)
So I found the button input in RAM: $0300/0304:

nothing - 00
Select - 20
Start - 10
B button - 40
A button - 80
A + B - C0
A + Select - 60
B + Select - A0
B + A + Select - E0

pad right - 01
pad left - 02
pad down - 04
pad up - 08

down/right - 05
down/left - 06
up/right - 09
up/left - 0A

right + B - 41
left + B - 42
down + B - 44
up + B - 48
up/right + B - 49
up/left + B - 4A

right + A - 81
left + A - 82
down + A - 84
up + A - 88
down/left + A - 86
up/left + A - 8A

Are these universal among every game? I tried the game, Amagon, which stored the values in $0006 and they matched.
Re: Gameplay-hacking Aladdin
by on (#135070)
There's more or less only three options:
1- First button is big end (A = $80, right = $01)
2- First button is little end (A = $01, right = $80)
3- Each button is in its own byte (usually sequential)

I feel like I've seen #1 most often.
Re: Gameplay-hacking Aladdin
by on (#135077)
Edit: never mind. Misread something.
Re: Gameplay-hacking Aladdin
by on (#135157)
It makes sense to see one of the 3 schemes lidnariq mentioned as the controller data is shifted in one byte at a time. Either rotating the stored byte and shifting in a new bit, or incrementing an address to store the bit are the easiest ways to deal with it.
Re: Gameplay-hacking Aladdin
by on (#136016)
Is this your hack or it's an unrelated project? http://www.romhacking.net/hacks/2181/
Re: Gameplay-hacking Aladdin
by on (#136195)
Quote:
http://www.romhacking.net/hacks/2181/


ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffantastic!

So I guess I don't have to do anything. I'll give this a playthrough just to be sure.
Re: Gameplay-hacking Aladdin
by on (#136594)
@Jedi QuestMaster

Dang, bro. Save some f's for the rest of us. :lol: