Hacking the SNES ROM

Discuss PoP1 for SNES here.
User avatar
Shauing
Calif
Calif
Posts: 435
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Hacking the SNES ROM

Post by Shauing »

spartacus735 wrote: June 27th, 2019, 11:30 pm wooo ! how did you change the sprite ? Do you have some news with the sprite tool ? the software is SNESTilesKitten ?
I changed the sprite with the tool that the guy is creating (it is not SNESTilesKitten).
It is still under construction, and for now it can only save edited sprites as new data on a .bin file (one sprite per file), and said data has to be copied on the rom wherever there's free space. Finally, the pointer for the sprite has to be changed to where the new data starts. I have asked him a few questions regarding on how the data will be managed once the tool is completed.
I have only tested it with the Jaffar graphics that appear on the video above, plus some of the Prince (which I tested in both palettes). Here's a video of the Prince sprites I have altered and inserted into the game:
NEW UPDATE! Prince Of Persia: 30th Anniversary Port v1.1.5. Download it today!: viewtopic.php?p=29053#p29053
NEW UPDATE! Prince Of Persia: The Queen Of Light v2.6. Download it today! viewtopic.php?p=33174#p33174
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

Thank you to everyone for the interesting ideas in this thread!
I have already inserted new story texts into a SNES ROM because of the directions here.

Maybe I missed the comment that told me how to, but how to change winning level and room?
Also, is there any offset that contains the PRINCE OF PERSIA and the “by Jordan Mechner” texts?
David
The Prince of Persia
The Prince of Persia
Posts: 2877
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Hacking the SNES ROM

Post by David »

4DPlayer wrote: July 13th, 2019, 3:27 pm Maybe I missed the comment that told me how to, but how to change winning level and room?
The winning level and room is just a special exit from level 20.
In Pr1SnesLevEd, open the hacks screen, go to the "special exits" tab, and change the room number under level 20 (and change the level itself if it's not level 20).
If you want to change the ending level, then on the "Jaffar's level" tab, change "show ending when the next level would be" to the level after your ending level.
4DPlayer wrote: July 13th, 2019, 3:27 pm Also, is there any offset that contains the PRINCE OF PERSIA and the “by Jordan Mechner” texts?
The title screen is an image, so we can't edit it until someone makes an image editor for PoP1 SNES.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5787
Joined: April 9th, 2009, 10:58 pm

Re: Hacking the SNES ROM

Post by Norbert »

David wrote: July 13th, 2019, 5:32 pmThe title screen is an image, so we can't edit it until someone makes an image editor for PoP1 SNES.
Until someone figures out how to import (pack/compress) graphics back into the ROM, right?
Because your software can already export the graphics, and we have image editors (e.g. GIMP).
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

David wrote: July 13th, 2019, 5:32 pm The winning level and room is just a special exit from level 20.
In Pr1SnesLevEd, open the hacks screen, go to the "special exits" tab, and change the room number under level 20 (and change the level itself if it's not level 20).
If you want to change the ending level, then on the "Jaffar's level" tab, change "show ending when the next level would be" to the level after your ending level.
Thank You.
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

David wrote: July 13th, 2019, 5:32 pm In Pr1SnesLevEd, open the hacks screen, go to the "special exits" tab, and change the room number under level 20 (and change the level itself if it's not level 20).
If you want to change the ending level, then on the "Jaffar's level" tab, change "show ending when the next level would be" to the level after your ending level.
I tried it but the Prince did not win. I entered room 11 from both sides, but he did not win. Didn't work with other rooms either.
Hack.JPG
Hack.JPG (10.2 KiB) Viewed 27020 times
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

Could it be that it is happening this way because I start the game from level 15?
I’ll try to see what happens if I play the whole game.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5787
Joined: April 9th, 2009, 10:58 pm

Re: Hacking the SNES ROM

Post by Norbert »

4DPlayer wrote: July 16th, 2019, 9:43 pmCould it be that it is happening this way because I start the game from level 15?
Perhaps the win level+room are the last level+room combination on the "special exits" tab?
So, for the win level+room, even if these are in level 15, modify the last level+room combination.
Change level 20 to 15, and the room to what you want.

Also, note that the room number is the one you exit on the left from.
You are not exiting to the room whose number you pick.

If it then still doesn't work, you may have found a bug.
David, who generally visits the forum during weekends, might know more.
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

Norbert wrote: July 16th, 2019, 11:02 pm
Perhaps the win level+room are the last level+room combination on the "special exits" tab?
So, for the win level+room, even if these are in level 15, modify the last level+room combination.
Change level 20 to 15, and the room to what you want.

Also, note that the room number is the one you exit on the left from.
You are not exiting to the room whose number you pick.

If it then still doesn't work, you may have found a bug.
David, who generally visits the forum during weekends, might know more.
Ok. I found out what was the issue. Back when I was using Apoplexy to modify Level 15, something went wrong in Pr1SnesLevEd. Apoplexy placed room 11 to the left of room 23. Pr1SnesLevEd placed it to the left of room 4. So, when I was testing the level through ZSNES thinking that room 11 was left of room 23, I was actually entering room 10 and exiting room 10 to the left did nothing. I now have linked room 11 left of room 23 on Pr1SNESLevEd.

Here's what is happening now. I exit room 11 to the left and I see the Clear Time and Password message. I press X and then I see a cutscene with the Princess. The cutscene ends, and then I find myself in Level 16.

For sure I am using the Level 20 exit
Any reasons this should be happening? (Probably because of Apoplexy in some way)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5787
Joined: April 9th, 2009, 10:58 pm

Re: Hacking the SNES ROM

Post by Norbert »

4DPlayer wrote: July 17th, 2019, 2:11 amOk. I found out what was the issue. Back when I was using Apoplexy to modify Level 15, something went wrong in Pr1SnesLevEd. Apoplexy placed room 11 to the left of room 23. Pr1SnesLevEd placed it to the left of room 4. So, when I was testing the level through ZSNES thinking that room 11 was left of room 23, I was actually entering room 10 and exiting room 10 to the left did nothing. I now have linked room 11 left of room 23 on Pr1SNESLevEd.
I don't fully understand what you write here, but one thing to keep in mind is this:
Room numbers in Pr1SnesLevEd are -1 of those in apoplexy.
Or, put the other way around: room numbers in apoplexy are +1 of those in Pr1SnesLevEd.
(Probably you were already aware of this, but just in case you were not...)
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

Norbert wrote: July 17th, 2019, 11:30 am

I don't fully understand what you write here, but one thing to keep in mind is this:
Room numbers in Pr1SnesLevEd are -1 of those in apoplexy.
Or, put the other way around: room numbers in apoplexy are +1 of those in Pr1SnesLevEd.
(Probably you were already aware of this, but just in case you were not...)
Yes. That is what I was trying to write. Apoplexy’s room 12 was Pr1SNESLevEd’s room 11.
Apoplexy’s room 11 was Pr1SNESLevEd’s room 10.
Therefore, when I thought I was entering room 11, I was actually entering the ROM’S room 10.

What I am having trouble with is that exiting the actual room 11 to the left only ends the Level instead of the whole game.
User avatar
Shauing
Calif
Calif
Posts: 435
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Hacking the SNES ROM

Post by Shauing »

4DPlayer wrote: July 17th, 2019, 4:07 pm
Norbert wrote: July 17th, 2019, 11:30 am

I don't fully understand what you write here, but one thing to keep in mind is this:
Room numbers in Pr1SnesLevEd are -1 of those in apoplexy.
Or, put the other way around: room numbers in apoplexy are +1 of those in Pr1SnesLevEd.
(Probably you were already aware of this, but just in case you were not...)
Yes. That is what I was trying to write. Apoplexy’s room 12 was Pr1SNESLevEd’s room 11.
Apoplexy’s room 11 was Pr1SNESLevEd’s room 10.
Therefore, when I thought I was entering room 11, I was actually entering the ROM’S room 10.

What I am having trouble with is that exiting the actual room 11 to the left only ends the Level instead of the whole game.
I asked this as well a year ago on this same thread for my Queen Of Light mod as it ends on Level 10. David answered this back in page 9; basically, there's a check you need to disable via hex-editing. Here are the steps:
viewtopic.php?f=122&t=3099&start=120#p23548
NEW UPDATE! Prince Of Persia: 30th Anniversary Port v1.1.5. Download it today!: viewtopic.php?p=29053#p29053
NEW UPDATE! Prince Of Persia: The Queen Of Light v2.6. Download it today! viewtopic.php?p=33174#p33174
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

Shauing wrote: July 17th, 2019, 8:27 pm I asked this as well a year ago on this same thread for my Queen Of Light mod as it ends on Level 10. David answered this back in page 9; basically, there's a check you need to disable via hex-editing. Here are the steps:
viewtopic.php?f=122&t=3099&start=120#p23548
Thank You Shauing, Norbert, and David!
It works now.

By the way, when I load the ROM image on the ZSNES emulator, it goes to the last level I played on. Why not to the title?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5787
Joined: April 9th, 2009, 10:58 pm

Re: Hacking the SNES ROM

Post by Norbert »

4DPlayer wrote: July 19th, 2019, 1:17 amBy the way, when I load the ROM image on the ZSNES emulator, it goes to the last level I played on. Why not to the title?
Assuming your ROM file is unheadered (1048576 bytes), could you check:
- Is the byte at 0x18018 (= 98328) 0x75 (or 0x7b for Japanese version) ?
- Is the byte at 0x1806C (= 98412) (or 0x18072 (= 98418) for Japanese version) 0x15 ?
You could use hex editor wxHexEditor to check.
4DPlayer

Re: Hacking the SNES ROM

Post by 4DPlayer »

Norbert wrote: July 19th, 2019, 2:03 am
4DPlayer wrote: July 19th, 2019, 1:17 amBy the way, when I load the ROM image on the ZSNES emulator, it goes to the last level I played on. Why not to the title?
Assuming your ROM file is unheadered (1048576 bytes), could you check:
- Is the byte at 0x18018 (= 98328) 0x75 (or 0x7b for Japanese version) ?
- Is the byte at 0x1806C (= 98412) (or 0x18072 (= 98418) for Japanese version) 0x15 ?
You could use hex editor wxHexEditor to check.
The byte at 0x18018 is 0x6B
The byte at 0x1806C is 0x0E
Post Reply