Modifications to prince.exe (hex editing)

User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by atrueprincefanfrom18 »

Norbert wrote: September 12th, 2021, 10:17 am
Shauing wrote: September 12th, 2021, 7:36 am I'm not sure if this can be done on Apoplexy where you have a wall that has a floor function instead of a wall, or a wall that is empty (meaning you can go through it)? Or graphics have to be changed? If so, what can be used to change the graphics?
Press "x" (or Ctrl+click on a tile) to go to the native tiles screen.
It has tiles that only work with SDLPoP/MININIM.
The first tab has all the fake tiles, including floors/spaces that look like walls.
Yes. And Shauing if you want the walls that are actually tile, you'll have to change some graphics. You can take a look at the Repetition Of Time mod's graphics.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
Shauing
Calif
Calif
Posts: 432
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Shauing »

How do you change the graphics here on DOS? What software are you all using to change the background and character sprites?
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
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Emiliano »

Shauing wrote: September 12th, 2021, 7:32 pm How do you change the graphics here on DOS? What software are you all using to change the background and character sprites?
Hi Shauing, Use PR, you can get it from popot, there are also instrucions for it
Put cmd in bin folder and type
PR --export file.dat-- and try again until you get the wanted file, for changes made, use PR --import (several files at once)
You can only use 16 colors, make sure to don't use more.
Finally edit pal files to change colors
65536
User avatar
Shauing
Calif
Calif
Posts: 432
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Shauing »

Is there a way to code to insert stuff from SNES such as the teleporters, fire and crusher traps? Not sure if memory/sprite slot issues might not permit this, but if at least the teleporters could be used (and sprite-wise could just reuse the exit level animation)?
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
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Emiliano »

Shauing wrote: September 13th, 2021, 8:57 pm Is there a way to code to insert stuff from SNES such as the teleporters, fire and crusher traps? Not sure if memory/sprite slot issues might not permit this, but if at least the teleporters could be used (and sprite-wise could just reuse the exit level animation)?
I don't know, DOS has a limited memory and it is too much for it :|
Some things should be replaced with other obstacles.
65536
User avatar
Shauing
Calif
Calif
Posts: 432
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Shauing »

Hmm, that's all right.
I'm having trouble with PR, I'm trying to follow the tutorial but keep getting this error:
PRError.png
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
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Emiliano »

Shauing wrote: September 13th, 2021, 9:37 pm Hmm, that's all right.
I'm having trouble with PR, I'm trying to follow the tutorial but keep getting this error:
PRError.png
Replace files.dat with the name of the file, it was just an example
65536
User avatar
Shauing
Calif
Calif
Posts: 432
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Shauing »

Emiliano Fierro wrote: September 13th, 2021, 10:04 pm
Shauing wrote: September 13th, 2021, 9:37 pm Hmm, that's all right.
I'm having trouble with PR, I'm trying to follow the tutorial but keep getting this error:
PRError.png
Replace files.dat with the name of the file, it was just an example
I was trying to pull out the resources.xml file but keeps getting that error; it wasn't the 'files.dat' example you gave.
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
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by atrueprincefanfrom18 »

Shauing wrote: September 13th, 2021, 8:57 pm Is there a way to code to insert stuff from SNES such as the teleporters, fire and crusher traps? Not sure if memory/sprite slot issues might not permit this, but if at least the teleporters could be used (and sprite-wise could just reuse the exit level animation)?
In DOS, most likely it's impossible but it might be possible to do in SDLPoP. Maybe David/dmitrys can explain the technical stuff.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: Modifications to prince.exe (hex editing)

Post by Norbert »

atrueprincefanfrom18 wrote: September 14th, 2021, 3:35 am
Shauing wrote: September 13th, 2021, 8:57 pm Is there a way to code to insert stuff from SNES such as the teleporters, fire and crusher traps? Not sure if memory/sprite slot issues might not permit this, but if at least the teleporters could be used (and sprite-wise could just reuse the exit level animation)?
[...] it might be possible to do in SDLPoP.
Yes. Technically, it's certainly possible with SDLPoP. Particularly teleporters of some sort should be relatively easy to implement. Even with their own legacy combos. These SNES tiles are already listed as an idea for SDLPoP here.

As for PR, the "Windows batch file" downloadable here should make using PR easy. If it's not sufficient, I and others could attempt improving that batch file until it is.
User avatar
Shauing
Calif
Calif
Posts: 432
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Shauing »

Norbert wrote: September 14th, 2021, 2:47 pm
Yes. Technically, it's certainly possible with SDLPoP. Particularly teleporters of some sort should be relatively easy to implement. Even with their own legacy combos. These SNES tiles are already listed as an idea for SDLPoP here.

As for PR, the "Windows batch file" downloadable here should make using PR easy. If it's not sufficient, I and others could attempt improving that batch file until it is.
Hopefully it is possible to implement, otherwise porting Level 5 of The Queen Of Light to DOS won't be possible and I'll have to basically do a replacement level.

Hmm, I'll try to get it to work somehow.
EDIT: It's still outputting an unknown file instead of exporting the files. Maybe by watching some images/video about how to export the resources would be nice?
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
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: Modifications to prince.exe (hex editing)

Post by Norbert »

Shauing wrote: September 16th, 2021, 3:59 amEDIT: It's still outputting an unknown file instead of exporting the files. Maybe by watching some images/video about how to export the resources would be nice?
Can you screen record what you do, and share that video recording with us.
Then we can see what you're doing, and hopefully provide suggestions.
User avatar
Shauing
Calif
Calif
Posts: 432
Joined: April 5th, 2018, 10:38 pm
Contact:

Re: Modifications to prince.exe (hex editing)

Post by Shauing »

Norbert wrote: September 16th, 2021, 1:02 pm
Shauing wrote: September 16th, 2021, 3:59 amEDIT: It's still outputting an unknown file instead of exporting the files. Maybe by watching some images/video about how to export the resources would be nice?
Can you screen record what you do, and share that video recording with us.
Then we can see what you're doing, and hopefully provide suggestions.
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
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Modifications to prince.exe (hex editing)

Post by David »

dmitry_s wrote: September 12th, 2021, 9:12 am In my mod, I was able to make shadow moon walk by assigning 1 into the direction. It flipped sprite images to the left but the forward movement was happening to the right.
You can do the same to the prince if you set the his starting direction to 1 in the level data with a hex editor.
Apoplexy will crash if you try load such a level, though.
dmitry_s wrote: September 12th, 2021, 9:12 am There was a side effect to this hack that caused the fall_y speed to be set to some value that caused the shadow to fall, then appear at the top of the screen, then fall again.
The above hack didn't cause this for me, but this also happens if the prince falls into the shadow's room.
(See here: viewtopic.php?p=15740#p15740)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: Modifications to prince.exe (hex editing)

Post by Norbert »

David wrote: September 18th, 2021, 9:32 amApoplexy will crash if you try load such a level, though.
I've not tested, but probably you mean "exit", maybe with the "[FAILED] Wrong dir.!" notice? I think "crash" would imply it additionally stopped functioning properly, e.g. read invalid memory.
Post Reply