Page 5 of 31

Re: Hacking the SNES ROM

Posted: May 12th, 2014, 4:50 am
by Kaslghnoon
salvadorc17 wrote:Any way to mod hacking the prince sprite colors...
You can do that with the latest Pr1SnesLevEd: Graphics, Edit sprites palette

Image

Re: Hacking the SNES ROM

Posted: May 12th, 2014, 8:50 pm
by salvadorc17
Yes, but i dont know how to proper alter or change those palletes values, any instruction???

Re: Hacking the SNES ROM

Posted: May 13th, 2014, 4:13 am
by Kaslghnoon
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.

Re: Hacking the SNES ROM

Posted: May 13th, 2014, 9:20 pm
by salvadorc17
Dont know about offset, what you mean the firts colum is for regular prince?

Image

Re: Hacking the SNES ROM

Posted: May 14th, 2014, 12:12 am
by spartacus735
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... ;)

Re: Hacking the SNES ROM

Posted: May 15th, 2014, 2:52 am
by salvadorc17
Thanks, ill test about it...

Re: Hacking the SNES ROM

Posted: May 15th, 2014, 2:52 am
by salvadorc17
Thanks, ill test about it... also you know why mirror is not working, when i add him as a guard??

Re: Hacking the SNES ROM

Posted: July 3rd, 2015, 9:52 pm
by salvadorc17
For the trigger guards, there is no way to use specified guard, instead of guard type (eg green, greenish blue)?

Re: Hacking the SNES ROM

Posted: July 4th, 2015, 5:14 pm
by David
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.

Re: Hacking the SNES ROM

Posted: July 4th, 2015, 9:44 pm
by salvadorc17
Good it worked, now i have to do this in each guard trigger??? maybe i should use only one guard trigger event per level...

Re: Hacking the SNES ROM

Posted: July 6th, 2015, 11:19 pm
by David
You can do this with the other guard triggers, if you want to check the room number instead of the guard type.

Re: Hacking the SNES ROM

Posted: July 8th, 2015, 9:50 pm
by salvadorc17
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

Re: Hacking the SNES ROM

Posted: July 10th, 2015, 5:42 pm
by David
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.

Re: Hacking the SNES ROM

Posted: July 10th, 2015, 9:49 pm
by salvadorc17
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...

Re: Hacking the SNES ROM

Posted: August 20th, 2015, 5:09 pm
by David
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.