Hacking the SNES ROM

Discuss PoP1 for SNES here.

Moderator: English Moderator Team

salvadorc17
Calif
Calif
Posts: 515
Joined: August 27th, 2011, 2:04 am

Re: Hacking the SNES ROM

Post by salvadorc17 » December 4th, 2015, 9:54 pm

Norbert wrote:Is there an easy (to find :)) hex edit to make jumping through the mirror possible in all levels and at all locations?
By default it's a pretty useless tile for PoP1 for SNES mods.
Yes, that should be changed to make it work like a trap, when you cross the mirror you get 1 point damage, that way is no more useless, just an idea :D

David
The Prince of Persia
The Prince of Persia
Posts: 1446
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Hacking the SNES ROM

Post by David » December 5th, 2015, 1:33 pm

Norbert wrote: Is there an easy (to find :)) hex edit to make jumping through the mirror possible in all levels and at all locations?

Code: Select all

coll mirror:
01:9A74: ad 64 04    LDA $0464 ; Char.chtype ; CharID
01:9A77: d0 40       BNE $9ab9 ; :c1
level 5 room 15 (mirror):
01:9A79: ad 79 05    LDA $0579 ; current level
01:9A7C: c9 04       CMP #$04
01:9A7E: d0 39       BNE $9ab9 ; :c1
Search: AD 79 05 C9 04 D0 39
Change: AD 79 05 to 4C 90 9A

There is a similar hack in the big list (first post) that disables row/column checks.
This one also disables level/room checks.
salvadorc17 wrote: that should be changed to make it work like a trap, when you cross the mirror you get 1 point damage
I did not find a solution, but here is what I tried:

Code: Select all

01:D180: a9 01       LDA #$01
01:D182: 8d 08 05    STA $0508 ; kid current HP ; KidStrength
Search: A9 01 8D 08 05
//Change: 8D 08 05 to 20 74 CF -- This wants to hurt the shadow instead! (hurt star)
//Change: 8D 08 05 to CE 08 05 -- This has problems if this was the last HP: The kid will keep running.
//Change: 8D 08 05 to 20 79 CF -- Still does not work. It shows the red flash and the hurt star, but the HP does not change.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3082
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Hacking the SNES ROM

Post by Norbert » December 5th, 2015, 2:29 pm

David wrote:Search: AD 79 05 C9 04 D0 39
Change: AD 79 05 to 4C 90 9A
Thanks!
David wrote:There is a similar hack in the big list (first post) that disables row/column checks.
You're referring to this, right?
[Edit: Just tested this. Yes, this is it.]
Kaslghnoon wrote:2) Make these offset changes:
x9A87 [$AD] to $4C
x9A88 [$5C] to $90
x9A89 [$04] to $9A
David wrote:
salvadorc17 wrote: that should be changed to make it work like a trap, when you cross the mirror you get 1 point damage
I did not find a solution, [...]
Maybe salvadorc17 meant what you already posted about, that the prince goes to 1 hitpoint with damage.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3082
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Hacking the SNES ROM

Post by Norbert » December 5th, 2015, 2:55 pm

Hm, is it also possible/easy to also make the shadow appear from the mirror?
Similar to allowing the prince to jump through the mirror everywhere, this would be useful for mods.
Then the shadow can trigger, for example, raise and drop buttons.
I didn't think of this earlier because only now that I know how to make the hex edits for the mirror I noticed the differences with the shadow.

David
The Prince of Persia
The Prince of Persia
Posts: 1446
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Hacking the SNES ROM

Post by David » December 5th, 2015, 3:31 pm

Norbert wrote:Hm, is it also possible/easy to also make the shadow appear from the mirror?
Do you mean when the prince jumps through it?
The shadow appears then, but with the wrong palette.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3082
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Hacking the SNES ROM

Post by Norbert » December 5th, 2015, 5:20 pm

David wrote:
Norbert wrote:Hm, is it also possible/easy to also make the shadow appear from the mirror?
Do you mean when the prince jumps through it?
The shadow appears then, but with the wrong palette.
Interesting...
Apparently I picked a room where the shadow doesn't show up.

It works for DOS:



It works for SNES:



But in level 5, room 4 (3), it does not:



And that's the room where I first tested it. :)

salvadorc17
Calif
Calif
Posts: 515
Joined: August 27th, 2011, 2:04 am

Re: Hacking the SNES ROM

Post by salvadorc17 » December 5th, 2015, 9:33 pm

Norbert wrote:
Maybe salvadorc17 meant what you already posted about, that the prince goes to 1 hitpoint with damage.
Yes, that was what i meant..


Norbert wrote:But in level 5, room 4 (3), it does not:
You also need to change the level where shadow appears in the right hex offseft? or no extra changes needed?

David
The Prince of Persia
The Prince of Persia
Posts: 1446
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Hacking the SNES ROM

Post by David » December 11th, 2015, 11:46 am

It looks like the shadow is explicitly removed on level 5 if he is not in room 15.
In the original game, this happens when he runs offscreen.

Code: Select all

shadow level checks: ShadowProg:
01:8BED: ad 79 05    LDA $0579 ; current level
01:8BF0: c9 04       CMP #$04 ; level 5
01:8BF2: f0 0d       BEQ $8c01 ; level 5 room 15 shadow mirror
...

level 5 room 15 shadow mirror:
01:8C01: ad 62 04    LDA $0462 ; Char.room ; CharScrn
01:8C04: c9 0f       CMP #$0f ; room 15
01:8C06: f0 03       BEQ $8c0b
01:8C08: 4c d5 92    JMP $92d5 ; VANISHCHAR

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3082
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Hacking the SNES ROM

Post by Norbert » December 22nd, 2015, 12:44 am

Kaslghnoon, apoplexy currently allows its users to more or less immediately playtest SNES levels by temporarily modifying the ROM before and after ZSNES' launch. At least for the US and EU versions. I used your findings to skip the intro and to set the non-training and training starting level numbers to the level number currently open in the editor. (The functions in the code are ModifyForZSNES() and ModifyBack().)

I'm wondering if maybe there's an even faster way.
I mean, it's not that important, but if it can be done even faster, then why not. :)
Somehow skip past the menu altogether...

User avatar
Kaslghnoon
Sultan
Sultan
Posts: 138
Joined: February 27th, 2010, 8:35 pm
Location: United States

Re: Hacking the SNES ROM

Post by Kaslghnoon » December 22nd, 2015, 7:21 am

Hi Norbert. Yes, what you requested can be done and it only takes two offset changes :)

For the US and EU versions:
x18018 to $6B
x1806C to the level number currently open in the editor

For the Japan version:
x18018 to $71
x18072 to the level number currently open in the editor

The first change skips right to Demo play, and the second offset edits the level which used to be Demo play.

Congratulations on releasing the latest apoplexy on time! The capability to modify SNES levels and playtest them on the spot makes the new apoplexy invaluable.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3082
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Hacking the SNES ROM

Post by Norbert » December 22nd, 2015, 12:26 pm

Hey, thanks Kaslghnoon, I'll use this for the next version.

User avatar
elveskz
Sheikh
Sheikh
Posts: 30
Joined: January 6th, 2017, 9:01 pm

Re: Hacking the SNES ROM

Post by elveskz » January 11th, 2017, 8:58 pm

How to find a offset for time remaining change in Jp version?

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3082
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Hacking the SNES ROM

Post by Norbert » January 11th, 2017, 10:12 pm

elveskz wrote:How to find a offset for time remaining change in Jp version?
Hi elveskz,

As Kaslghnoon mentions in his post here, you will need a patched ROM.
In his post, search for "Edit time limit:", then read the section above it.

The patched ROM he included - linked to - in his post there is the US (= KONAMI) version.
You need to start by patching the JP version, see the instructions here.
Then use a hex editor to search for and modify the values I've marked with brackets below.
Kaslghnoon's post includes example values.
-----
27 06 8D 47 05 A9 [00] 4C C6 FE 05 8D 2F
C9 AD 8D 2D 05 A9 [00] 8D 2E 05 A9 00 4C
-----

User avatar
elveskz
Sheikh
Sheikh
Posts: 30
Joined: January 6th, 2017, 9:01 pm

Re: Hacking the SNES ROM

Post by elveskz » January 11th, 2017, 10:47 pm

Norbert wrote:
elveskz wrote:How to find a offset for time remaining change in Jp version?
Hi elveskz,

As Kaslghnoon mentions in his post here, you will need a patched ROM.
In his post, search for "Edit time limit:", then read the section above it.

The patched ROM he included - linked to - in his post there is the US (= KONAMI) version.
You need to start by patching the JP version, see the instructions here.
Then use a hex editor to search for and modify the values I've marked with brackets below.
Kaslghnoon's post includes example values.
-----
27 06 8D 47 05 A9 [00] 4C C6 FE 05 8D 2F
C9 AD 8D 2D 05 A9 [00] 8D 2E 05 A9 00 4C
-----
Thanks Norbert!! It worked, now only need to edit the name of the game in the main menu and the rom is ready for download.

User avatar
NITM-T
Sheikh
Sheikh
Posts: 43
Joined: July 29th, 2017, 12:10 am

Re: Hacking the SNES ROM

Post by NITM-T » August 30th, 2017, 9:47 am

Hi guys, I need a little help here. Training Mode have 5 levels and each one it's like: Training 1, 2, 3... Which are the HEX for these numbers? I mean, the offset is xCAEF (T) till xCAF6 (G) and xCAF7, it's a space before the number (supposed to be the number), but it's $00 that also have one before the (T). I looked on the Lost Bottle, but I did not find the difference...
May the Moon light your path and together, we will open the way at Grand Clock.

Post Reply