Hacking the SNES ROM

Discuss PoP1 for SNES here.

Moderator: English Moderator Team

Post Reply
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 » May 12th, 2014, 4:50 am

salvadorc17 wrote:Any way to mod hacking the prince sprite colors...
You can do that with the latest Pr1SnesLevEd: Graphics, Edit sprites palette

Image

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

Re: Hacking the SNES ROM

Post by salvadorc17 » May 12th, 2014, 8:50 pm

Yes, but i dont know how to proper alter or change those palletes values, any instruction???

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 » May 13th, 2014, 4:13 am

salvadorc17 wrote:Yes, but i dont know how to proper alter or change those palletes values, any instruction???
I suppose you're asking for an effortless way to change the prince palettes, which is totally fine.

Offsets:
x73E6 (Default: Prince)
x73EB (Default: Red Prince)
x7443 (Default: Slow fall Prince)

Values:
$00: regular prince
$01: red prince
$02: slow-fall prince
$03: dead puprle
$04: skel
$05: brown skel
$06: yellow skel
$07: girl
$08: fat
$09: shadow
$0A: green
$0B: greenish blue
$0C: blue
$0D: red
$0E: purple
$0F: blueface
$10: red knight
$11: blue knight
$12: monster
$13: jaffar
$14: mouse
$15: red skel

Note: The above list is not to be confused with robert's list on the 3rd page.

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

Re: Hacking the SNES ROM

Post by salvadorc17 » May 13th, 2014, 9:20 pm

Dont know about offset, what you mean the firts colum is for regular prince?

Image

User avatar
spartacus735
Sultan
Sultan
Posts: 165
Joined: November 20th, 2011, 12:41 pm
Location: France

Re: Hacking the SNES ROM

Post by spartacus735 » May 14th, 2014, 12:12 am

salvadorc17 wrote:Dont know about offset, what you mean the firts colum is for regular prince?

Image
line not colum, and the second line is for the red prince etc... ;)
>>>>>>>>>>>>>>>>>>>> http://www.youtube.com/user/spartacus735 <<<<<<<<<<<<<<<<<<<< the channel of prince of persia snes mod

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

Re: Hacking the SNES ROM

Post by salvadorc17 » May 15th, 2014, 2:52 am

Thanks, ill test about it...

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

Re: Hacking the SNES ROM

Post by salvadorc17 » May 15th, 2014, 2:52 am

Thanks, ill test about it... also you know why mirror is not working, when i add him as a guard??

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

Re: Hacking the SNES ROM

Post by salvadorc17 » July 3rd, 2015, 9:52 pm

For the trigger guards, there is no way to use specified guard, instead of guard type (eg green, greenish blue)?

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

Re: Hacking the SNES ROM

Post by David » July 4th, 2015, 5:14 pm

So you want the event to be triggered by a certain guard, instead of a certain guard type?
For example, we could change the code to check the current room instead of the guard type.
But then you have to make sure that the guard stays in that room.

To do this change, go to the offset of the guard type.
You should find these bytes there:
AD 2B 06 C9 nn (nn is the guard type, it's the byte where you're standing.)
Change it to:
AD 92 04 C9 nn, where nn is the room number.

In the example I sent you earlier, this would mean that you replace AD 2B 06 C9 07 (that ends at xADC0) with AD 92 04 C9 01, because the guard is in room 01.

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

Re: Hacking the SNES ROM

Post by salvadorc17 » July 4th, 2015, 9:44 pm

Good it worked, now i have to do this in each guard trigger??? maybe i should use only one guard trigger event per level...

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

Re: Hacking the SNES ROM

Post by David » July 6th, 2015, 11:19 pm

You can do this with the other guard triggers, if you want to check the room number instead of the guard type.

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

Re: Hacking the SNES ROM

Post by salvadorc17 » July 8th, 2015, 9:50 pm

Ok, i got it, now i was wondering, it is possible to change special exits level for example any other level.

Code: Select all

Special exits:

-Edit level 9 exit: Level x834D [LIST 1], room x8354 [LIST 4], exit down
-Edit level 15 exit: Level x82DF [LIST 1], room x82DF [LIST 4], exit left
-Edit level 16 exit: Level x82E5 [LIST 1], room x82EC [LIST 4], exit left
-Edit level 17 exit: Level x82F0 [LIST 1], room x82F7 [LIST 4], exit left
-Edit level 20 exit: Level x8306 [LIST 1], room x830D [LIST 4], exit left

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

Re: Hacking the SNES ROM

Post by David » July 10th, 2015, 5:42 pm

Sorry, I don't understand your question.
If you want to change level number where the events happen, then you already have the offsets for that.

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

Re: Hacking the SNES ROM

Post by salvadorc17 » July 10th, 2015, 9:49 pm

Oh ok i get confused, i think only was option to change the room of special exit, now the thing is there can be only 5 special exits...

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

Re: Hacking the SNES ROM

Post by David » August 20th, 2015, 5:09 pm

I found a mistake in the first post. (With some "help" from spartacus735.)
Kaslghnoon wrote: Level 7: Shadow steal
x872B = Level where shadow steal occurs
  • x8C44 = Room where shadow steal occurs
    • x77CE = Level where shadow shape and palette is applied
      • x75DB = Room where shadow shape and palette is applied
        • -Disable shadow steal:
          x872B to $CC
          x77CE to $CC
The offset x77CE is wrong.
If x77CE is changed to $CC, then the main menu will change colors: viewtopic.php?p=17030#p17030

The disassembly around offset x77CE:
(Note: Addresses are shown as the CPU sees them. 00:F### in the disassembly = x7### in the file.)

Code: Select all

main menu (palette?):
00:F7CE: a9 04       LDA #$04
00:F7D0: 20 61 f5    JSR $f561 ; set palette slot index =A + find palette $45=69
00:F7D3: a2 0c 00    LDX #$000c ; row 12 in the palette editor
00:F7D6: 20 73 f5    JSR $f573 ; seek row X in palette resource
00:F7D9: 4c 8c f5    JMP $f58c ; write palette (A rows)
The disassembly around offset x75DB (shadow room):

Code: Select all

level 7 room 16 (shadow steal):
00:F5CE: af 79 05 00 LDA $00:0579 ; current level
00:F5D2: c9 06       CMP #$06 ; level 7
00:F5D4: d0 0e       BNE $f5e4
00:F5D6: af 06 05 00 LDA $00:0506 ; shown room
00:F5DA: c9 10       CMP #$10 ; room 16
00:F5DC: d0 06       BNE $f5e4
00:F5DE: a9 06       LDA #$06 ; Shadow
00:F5E0: 8f 2b 06 00 STA $00:062b ; guard type
00:F5E4: ...
It seems that x75D3 is the likely offset for changing the level.

Post Reply