New Here, SNES Guards And Questions

Post Reply
User avatar
Shauing
Calif
Calif
Posts: 431
Joined: April 5th, 2018, 10:38 pm
Contact:

New Here, SNES Guards And Questions

Post by Shauing »

Hello, everyone. This is my first time over here, very glad to join this great community.

I have a few questions regarding the SNES Prince of Persia. I am currently working on my first mod, and I have this idea I want to toy with about guards falling to another room without dying. Normally when you push them and fall to another room, they die.
Prince of Persia (USA) 0000.png
Prince of Persia (USA) 0000.png (7.48 KiB) Viewed 8901 times
Prince of Persia (USA) 0001.png
Prince of Persia (USA) 0001.png (7.3 KiB) Viewed 8901 times
Prince of Persia (USA) 0002.png
Prince of Persia (USA) 0002.png (5.02 KiB) Viewed 8901 times
Instead, I want the guard alive in the next room:
Prince of Persia (USA) 0005.png
Prince of Persia (USA) 0005.png (6.28 KiB) Viewed 8901 times
Is there any possibility to do this?

Another question: Is it possible to insert composed custom music/sound effects?

Thanks to all of you for creating this awesome community and hope someone can answer these first questions.
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
User avatar
spartacus735
Wise Scribe
Wise Scribe
Posts: 217
Joined: November 20th, 2011, 12:41 pm
Location: France

Re: New Here, SNES Guards And Questions

Post by spartacus735 »

Hey, welcome to Princed.org. First, it is not possible to keep the guard alive in the next room with this method. I think the only way you can do that is to put the skeletal guard from level three ( the boss ). Secondly, you cannot add custom music. We already talked about it on the forum, adding content on the .ROM is theoretically impossible.
>>>>>>>>>>>>>>>>>>>> http://www.youtube.com/user/spartacus735 <<<<<<<<<<<<<<<<<<<< the channel of prince of persia snes mod
User avatar
Shauing
Calif
Calif
Posts: 431
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: New Here, SNES Guards And Questions

Post by Shauing »

Thank you for replying. I think I missed that discussion (I did search through lots of posts, though); I thought maybe modifying something via hex editing could made any of those things possible. Perhaps I am somewhat too ambitious; I will test your suggestion. Thanks again, and hopefully soon I will post at least a test of my mod so that all of you can give an opinion.
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
User avatar
NITM-T
Sultan
Sultan
Posts: 182
Joined: July 29th, 2017, 12:10 am

Re: New Here, SNES Guards And Questions

Post by NITM-T »

Shauing wrote: April 5th, 2018, 11:38 pm I am currently working on my first mod, and I have this idea I want to toy with about guards falling to another room without dying. Normally when you push them and fall to another room, they die.
Welcome, buddy!
As spartacus735 said: "it is not possible to keep the guard alive in the next room with this method.", but, I think it is because 2 things: they HP on screen and the song after they die. I mean, like he also talked about the Skeleton from level 3, we can use them (not only this one from level 3), but whenever you want to put a Skeleton with level editor for such level becuase they can survive after fall. But, I think that the level 3 Skeleton is the only one that will survive after fall by default alone.

For examplo, a normal Skeleton can fall from row 0 to 2 and it'll survive, but to it to fall to the room below and stay alive, you must go there at same time, too. Then, the victory song won't happen and since they don't has HP, they'll survive.
The same goes to the Brown Skeleton, but for this one, it will die and I don't know why and the song also plays, but when you change rooms like, go up and down again, it will be there, alive, y'know?

Now, to use normal Guards and Bosses, you'll need change HEXs like these:
Guards like skeletons:
Search: A9 02 8D 64 04 60
Change 02 to 04.

Guards like brown skeletons:
Search: AD 2B 06 C9 02 D0 0F
Change D0 0F to EA EA.

David, has posted this before in some thread, like that all Guards and Bosses will be like Skeletons, so they will survive too, but as Brown Skeleton, then just do like I said, go to another room and go back to they stand up again.
Or you can simply change Skeleton and Brown Skeleton to Normal Guard with the level editor. That trick doesn't work with Golden Skeleton because it is already like a guard.

This is a bit complicated and I don't speak English, so this will be more hard for you, sorry for that. But, I'm glad to know that you'll bring us a new SNES mod in the future and I wanted to help you with that question of yours ^_^.
Good luck with your project!
May the Moon light your path.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: New Here, SNES Guards And Questions

Post by David »

Shauing wrote: April 5th, 2018, 11:38 pm I have a few questions regarding the SNES Prince of Persia. I am currently working on my first mod, and I have this idea I want to toy with about guards falling to another room without dying. Normally when you push them and fall to another room, they die.

Instead, I want the guard alive in the next room:

Is there any possibility to do this?
There is an invisible object called "skel cont". (You can find it in one of the dropdown lists in Pr1SnesLevEd.)
If you place it in a room, a skeleton will reappear there if it falls into that room.
This is how the skeleton of level 3 reappears after you push it offscreen. Not just once but even twice.

Here is a hex-edit that enables this feature for all guards:
find: AD 84 04 C9 04 F0 30
change: F0 to 80
User avatar
Shauing
Calif
Calif
Posts: 431
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: New Here, SNES Guards And Questions

Post by Shauing »

Thank you spartacus735, NITM-T and David for all your valuable help to this newbie, I really appreciate it!

There are lots of other ambitious ideas I have (adding custom music was one of those as I am studying to be a music composer), but I think I have to avoid bite off more than what I can chew.
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
User avatar
NITM-T
Sultan
Sultan
Posts: 182
Joined: July 29th, 2017, 12:10 am

Re: New Here, SNES Guards And Questions

Post by NITM-T »

David wrote: April 7th, 2018, 10:05 am Here is a hex-edit that enables this feature for all guards:
find: AD 84 04 C9 04 F0 30
change: F0 to 80
These codes are awesome! I always wanted to do that with Guards. Thanks for sharing this. But the way I said before is better because is a trick and when tricks and glitches overcomes HEX and GameShark, it's amazing :cool: Of course that, we'll still need to use the level editor for this one hahaha.
There is another way, too. Those who play my mods, maybe know how to do it.
Shauing wrote: April 7th, 2018, 11:16 am Thank you spartacus735, NITM-T and David for all your valuable help to this newbie, I really appreciate it!

There are lots of other ambitious ideas I have (adding custom music was one of those as I am studying to be a music composer), but I think I have to avoid bite off more than what I can chew.
You're welcome!
Nice to know that, about you ambitious ideas and stuff. I really wanted to see a SNES PoP mod with custom musics, but didn't know that was impossible (I don't read this thread before, either). I mean, after see a few SNES ROMHacks with custom musics, I thought that was possible for PoP. Too bad...
Don't wanna start a conversation about that because already exist, this is only my thoughts...
May the Moon light your path.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: New Here, SNES Guards And Questions

Post by David »

NITM-T wrote: April 7th, 2018, 11:45 am
David wrote: April 7th, 2018, 10:05 am Here is a hex-edit that enables this feature for all guards:
find: AD 84 04 C9 04 F0 30
change: F0 to 80
These codes are awesome! I always wanted to do that with Guards. Thanks for sharing this.
Sorry, it seems that the code I gave will break something.
Normally, on level 15, when the shadow falls out of the screen, the prince dies. This hack breaks that.

Here is a corrected version:
find: AD 84 04 C9 04 F0 30 C9 01 F0 1C
change to: AD 84 04 C9 01 F0 20 C9 04 80 2C

Here is the relevant part of the disassembly:

Code: Select all

01:85A9: ad 84 04    LDA $0484 ; Shad.chtype
01:85AC: c9 04       CMP #$04
01:85AE: f0 30       BEQ $85e0 ; skeleton fell out
01:85B0: c9 01       CMP #$01
01:85B2: f0 1c       BEQ $85d0 ; shadow fell out
My original hack changed the first BEQ (branch if equal) to BRA (branch always), therefore the game always took the "skeleton fell out" route, and never the "shadow fell out" route.
My new hack first swaps the two checks (in addition to what my first hack does), so the shadow check is first.

NITM-T wrote: April 7th, 2018, 11:45 am I really wanted to see a SNES PoP mod with custom musics, but didn't know that was impossible (I don't read this thread before, either).
It's not impossible, it's just we don't have any tools for that.
I wrote some documentation about the format of SNES PoP music, and I also made a tool that converts such music to MIDI, but that's all.
You can find them here: viewtopic.php?f=122&t=3774
Beware, they are very technical.
NITM-T wrote: April 7th, 2018, 11:45 am I mean, after see a few SNES ROMHacks with custom musics, I thought that was possible for PoP. Too bad...
Really? Of which games, and more importantly, how did they change the music?
Did they use manual hex-editing, or some music editor custom-made for the game, or maybe conversion from MIDI to the game's custom format?
User avatar
Shauing
Calif
Calif
Posts: 431
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: New Here, SNES Guards And Questions

Post by Shauing »

David wrote: April 8th, 2018, 8:16 am
Sorry, it seems that the code I gave will break something.
Normally, on level 15, when the shadow falls out of the screen, the prince dies. This hack breaks that.

Here is a corrected version:
find: AD 84 04 C9 04 F0 30 C9 01 F0 1C
change to: AD 84 04 C9 01 F0 20 C9 04 80 2C
Oh, good thing that I have only implemented it as a test on a copy.

David wrote: April 8th, 2018, 8:16 am It's not impossible, it's just we don't have any tools for that.
I wrote some documentation about the format of SNES PoP music, and I also made a tool that converts such music to MIDI, but that's all.
You can find them here: viewtopic.php?f=122&t=3774
Beware, they are very technical.
Good to know at least that it is not impossible.

NITM-T wrote: April 7th, 2018, 11:45 am I mean, after see a few SNES ROMHacks with custom musics, I thought that was possible for PoP. Too bad...
David wrote: April 8th, 2018, 8:16 am Really? Of which games, and more importantly, how did they change the music?
Did they use manual hex-editing, or some music editor custom-made for the game, or maybe conversion from MIDI to the game's custom format?
Searching around, some Super Metroid and more commonly, Super Mario World hacks have custom music. For Super Metroid I found one thread discussing about it:
http://forum.metroidconstruction.com/in ... pic=2390.0

And for Super Mario World I found two threads for tutorials about it:
https://www.smwcentral.net/?p=viewthread&t=54040
https://www.smwcentral.net/?p=viewthread&t=48314

Hopefully, something from those threads might help.
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
User avatar
NITM-T
Sultan
Sultan
Posts: 182
Joined: July 29th, 2017, 12:10 am

Re: New Here, SNES Guards And Questions

Post by NITM-T »

David wrote: April 8th, 2018, 8:16 am Sorry, it seems that the code I gave will break something.
Normally, on level 15, when the shadow falls out of the screen, the prince dies. This hack breaks that.

Here is a corrected version:
find: AD 84 04 C9 04 F0 30 C9 01 F0 1C
change to: AD 84 04 C9 01 F0 20 C9 04 80 2C

Here is the relevant part of the disassembly:

Code: Select all

01:85A9: ad 84 04    LDA $0484 ; Shad.chtype
01:85AC: c9 04       CMP #$04
01:85AE: f0 30       BEQ $85e0 ; skeleton fell out
01:85B0: c9 01       CMP #$01
01:85B2: f0 1c       BEQ $85d0 ; shadow fell out
My original hack changed the first BEQ (branch if equal) to BRA (branch always), therefore the game always took the "skeleton fell out" route, and never the "shadow fell out" route.
My new hack first swaps the two checks (in addition to what my first hack does), so the shadow check is first.
I see. Good to know that you notice that. Anyway, you still have my thanks ^_^. But, about the part where Prince dies, I think I could use that as a trap, then the player must understand that he/she needs to find another route to kill Shadow or something with the Sword, hahaha.
David wrote: April 8th, 2018, 8:16 am It's not impossible, it's just we don't have any tools for that.
I wrote some documentation about the format of SNES PoP music, and I also made a tool that converts such music to MIDI, but that's all.
You can find them here: viewtopic.php?f=122&t=3774
Beware, they are very technical.
I also supposed to said that before: "it's just we don't have any tools for that." This would explain better as you did.
"Beware, they are very technical." Hahaha, for sure. But, I'll take a look, anyway.
David wrote: April 8th, 2018, 8:16 am Really? Of which games, and more importantly, how did they change the music?
Did they use manual hex-editing, or some music editor custom-made for the game, or maybe conversion from MIDI to the game's custom format?
Well, that you'll have to see by yourself because I can't explain these thing. Sorry...
http://forum.metroidconstruction.com/index.php
https://www.smwcentral.net/?p=section&s=smwhacks

These're Metroid and Super Mario hack forums and maybe, everyone here already know about them. They have all tools for change rooms, enemies, musics and stuff. They also put new stories on games where they don't has by default, they also to create new events by change all the whole thing. See these videos:

This Super Mario World has musics from Final Fantasy series. I love this one :lol:



This one is also pretty good! Has a totally dufferent story (like I said: they put story where don't has on the original and also, new musics, new enemies and even a map before the stage starts like Castlevania from NES:



This is a Super Metroid mini-hack that also had its rooms, musics, enemies, items and events modifieds:



These videos were made with TAS, but you can have a good look on them.

This is a project that still WIP from Metaquarius. He create a new Metroid Fusion over Super Metroid, X-Fuison. He changed everything on the game and also put 2 new languages and that HUD, is amazing!:



Look at this. He put a new storyline with an anime Samus and she has facial expressions! Also, there're options/questions that we have to choose/answer in order to proceed in the game. Those things don't ever has on the original one! I'm really waiting to play it:



There's this video in his channel. You know this program? I think is one of those that people can make new songs:



There's a Top Gear video, but I couldn't find it now... And I don't understand for sure how they did for Top Gear, but it's like a program or SD Card that they use on real Console or something, but also works for emulator like SNES9x and Higan... You can see this site to understand better:
https://www.epforums.org/showthread.php ... or-SD2SNES

So, with all those things already done, I thought that would be a piece of cake for those who know they stuff if they have the programs to do the same with SNES PoP, y'know? But now, I see that isn't that easy...
Last edited by NITM-T on April 9th, 2018, 5:10 am, edited 1 time in total.
May the Moon light your path.
User avatar
NITM-T
Sultan
Sultan
Posts: 182
Joined: July 29th, 2017, 12:10 am

Re: New Here, SNES Guards And Questions

Post by NITM-T »

Shauing wrote: April 8th, 2018, 10:47 am Searching around, some Super Metroid and more commonly, Super Mario World hacks have custom music. For Super Metroid I found one thread discussing about it:
http://forum.metroidconstruction.com/in ... pic=2390.0

And for Super Mario World I found two threads for tutorials about it:
https://www.smwcentral.net/?p=viewthread&t=54040
https://www.smwcentral.net/?p=viewthread&t=48314

Hopefully, something from those threads might help.
Hahaha, once again, I took a whole life to post in English and Shauing, just did already. But, I hope there're no problems about this, with more people sharing things, more ideias we'll have ;)
May the Moon light your path.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: New Here, SNES Guards And Questions

Post by David »

To be honest, I'm not familiar with the games in your videos (Super Mario World and Super Metroid), so I can't really tell how much did they modify the games.
NITM-T wrote: April 8th, 2018, 12:04 pm There's this video in his channel. You know this program? I think is one of those that people can make new songs:
I don't know that program, but I see it's called "SNES SPC700 Player", so I guess you can't make new songs with it, only play the existing ones.
(By the way, VLC player also plays *.SPC files.)
NITM-T wrote: April 8th, 2018, 12:04 pm but it's like a program or SD Card that they use on real Console or something, but also works for emulator like SNES9x and Higan... You can see this site to understand better:
https://www.epforums.org/showthread.php ... or-SD2SNES
That topic is about games patched to use the unofficial MSU-1 chip, which enhances the capabilities of the SNES.
From what I understand:
  • To play such games on a real SNES, you need a SD2SNES, which is a piece of hardware that you plug into a SNES like a cartridge, and it accepts an SD card.
    (I'd note here that the linked page does not tell explicitly that SD2SNES goes into the cartridge slot on the SNES. As opposed to say, being a complete self-contained remake of SNES hardware. As if this was obvious to everyone.)
    Then you can play the SNES games on the SD card on the real SNES. It also contains the aforementioned MSU-1 chip needed by the patched games.
  • To play such games on a SNES emulator, you can use Snes9X v1.55 or newer or Higan, which can emulate the MSU-1 chip.
Anyway, this does not seem to be relevant for PoP SNES.
Shauing wrote: April 8th, 2018, 10:47 am And for Super Mario World I found two threads for tutorials about it:
https://www.smwcentral.net/?p=viewthread&t=54040
https://www.smwcentral.net/?p=viewthread&t=48314
From what I see, they have a tool to convert MIDI to MML (tinymm), some tool to edit MML, and a tool to put it into the game (Addmusic).
This MML format seems to be quite similar to the format of PoP1 SNES songs, for example @ is for instrument selection, CDEFGAB are the notes, R is for rests, etc.
MML even has syntax for repeating the same sequence a given number of times, which is also a feature of PoP's format.
User avatar
NITM-T
Sultan
Sultan
Posts: 182
Joined: July 29th, 2017, 12:10 am

Re: New Here, SNES Guards And Questions

Post by NITM-T »

David wrote: April 15th, 2018, 12:18 pm To be honest, I'm not familiar with the games in your videos (Super Mario World and Super Metroid), so I can't really tell how much did they modify the games.
Oh, I see.
David wrote: April 15th, 2018, 12:18 pm I don't know that program, but I see it's called "SNES SPC700 Player", so I guess you can't make new songs with it, only play the existing ones.
(By the way, VLC player also plays *.SPC files.)
Indeed, but I wanted your opinion because you guys pretty know about those things because I cannot tell only with my eyes.
David wrote: April 15th, 2018, 12:18 pm That topic is about games patched to use the unofficial MSU-1 chip, which enhances the capabilities of the SNES.
From what I understand:
  • To play such games on a real SNES, you need a SD2SNES, which is a piece of hardware that you plug into a SNES like a cartridge, and it accepts an SD card.
    (I'd note here that the linked page does not tell explicitly that SD2SNES goes into the cartridge slot on the SNES. As opposed to say, being a complete self-contained remake of SNES hardware. As if this was obvious to everyone.)
    Then you can play the SNES games on the SD card on the real SNES. It also contains the aforementioned MSU-1 chip needed by the patched games.
  • To play such games on a SNES emulator, you can use Snes9X v1.55 or newer or Higan, which can emulate the MSU-1 chip.
Anyway, this does not seem to be relevant for PoP SNES.
Now I got it. In that video from Top Gear that I didn't find before, the guy there explain this, but I only can read English, so I wanted to post here to you to see, but I also found that site before, then I remembered it and brought here instead.

Thank you very much for your help!
May the Moon light your path.
User avatar
Shauing
Calif
Calif
Posts: 431
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: New Here, SNES Guards And Questions

Post by Shauing »

David wrote: April 15th, 2018, 12:18 pm From what I see, they have a tool to convert MIDI to MML (tinymm), some tool to edit MML, and a tool to put it into the game (Addmusic).
This MML format seems to be quite similar to the format of PoP1 SNES songs, for example @ is for instrument selection, CDEFGAB are the notes, R is for rests, etc.
MML even has syntax for repeating the same sequence a given number of times, which is also a feature of PoP's format.
It would be great if there was some way (tool/hex editing/something) to implement the MIDI converted to MML file into the game.

If said tool doesn't exist or cannot be created to add music/sounds, and/or things cannot be added to a ROM, perhaps finding how the music is written in the hex format and attempt to write or replace it there?

I'm just trying to come up with possibilities.
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
Post Reply