I've created an Prince of Persia .exe editor for DOS.
You can download it here: http://www.mediafire.com/download.php?iyygkm3t3t0
UPDATE:
- 1.1 released.
- Distribution now includes source
Contents of PRINHELP.TXT :
PrinHackEd v1.1
-=-=-=-=-=-=-=-
by mickey96
What is PrinHackEd?
-------------------
PrinHackEd is a .EXE editor for the original 1990 Prince of Persia by Jordan Merchner. Tired of having
to fire up a browser just to use CusPop? Tired of hex editing? Tired of reading slow download from
CusPop? Tired of reading this? Then give PrinHackEd a try and you'll see its powerful!
Essential keys
--------------
Q - Quits the program. (without asking if you want to save your changes!)
H - Gives some help. (This gives some more information).
S - Saves a patch see Patch Files
L - Saves a patch see Patch Files
W - Writes changes to PRINCE.EXE.
R - Runs the written PRINCE.EXE. (not working yet)
General section keys
--------------------
T - Set starting time.
P - Set hit point the prince has when he starts level 1.
Guards section keys
-------------------
P - Edit guards' hit points
T - Edit guards' type on each level
Misc section keys
-----------------
A - Enable\Disable WDA
E - Edit level types
Patch Files
-----------
Patches file use the .PEH extension. This is where to store the starting time
and hit points. This helps to keep changes along with your mod. And they are 8K right now, (the program writes some unexpected bytes though).
Patch files are entirely different from DAT files. You just can't play a mod like typing PRINCE EXAMPLE.PEH,
it won't work! You need to load from PrinHackEd and write the changes.
How to read a patch file:
-------------------------
This will show how to do it in Pascal. (I'll let you to port it to C\C++).
InstallationCode: Select all
procedure LoadPatch (Filename : String); var PatchHandle : File; begin Assign(PatchHandle, Filename); if IOResult = 0 then begin BlockRead(PatchHandle, PatchVer, 1, PatchVer); BlockRead(PatchHandle, Time, 2); BlockRead(PatchHandle, HPLimit, 2); BlockRead(PatchHandle, HP, 2); BlockRead(PatchHandle, GHPDEMO, 1); BlockRead(PatchHandle, GHP1, 1); BlockRead(PatchHandle, GHP2, 1); BlockRead(PatchHandle, GHP3, 1); BlockRead(PatchHandle, GHP4, 1); BlockRead(PatchHandle, GHP5, 1); BlockRead(PatchHandle, GHP6, 1); BlockRead(PatchHandle, GHP7, 1); BlockRead(PatchHandle, GHP8, 1); BlockRead(PatchHandle, GHP9, 1); BlockRead(PatchHandle, GHP10, 1); BlockRead(PatchHandle, GHP11, 1); BlockRead(PatchHandle, GHP12a, 1); BlockRead(PatchHandle, GHP12b, 1); BlockRead(PatchHandle, GHP13, 1); BlockRead(PatchHandle, GTYP1, 2); BlockRead(PatchHandle, GTYP2, 2); BlockRead(PatchHandle, GTYP3, 2); BlockRead(PatchHandle, GTYP4, 2); BlockRead(PatchHandle, GTYP5, 2); BlockRead(PatchHandle, GTYP6, 2); BlockRead(PatchHandle, GTYP7, 2); BlockRead(PatchHandle, GTYP8, 2); BlockRead(PatchHandle, GTYP9, 2); BlockRead(PatchHandle, GTYP10, 2); BlockRead(PatchHandle, GTYP11, 2); BlockRead(PatchHandle, GTYP12a, 2); BlockRead(PatchHandle, GTYP12b, 2); BlockRead(PatchHandle, GTYP13, 2); BlockRead(PatchHandle, LTYPDEMO, 1); BlockRead(PatchHandle, LTYP1, 1); BlockRead(PatchHandle, LTYP2, 1); BlockRead(PatchHandle, LTYP3, 1); BlockRead(PatchHandle, LTYP4, 1); BlockRead(PatchHandle, LTYP5, 1); BlockRead(PatchHandle, LTYP6, 1); BlockRead(PatchHandle, LTYP7, 1); BlockRead(PatchHandle, LTYP8, 1); BlockRead(PatchHandle, LTYP9, 1); BlockRead(PatchHandle, LTYP10, 1); BlockRead(PatchHandle, LTYP11, 1); BlockRead(PatchHandle, LTYP12a, 1); BlockRead(PatchHandle, LTYP12b, 1); BlockRead(PatchHandle, LTYP13, 1); Close(PatchHandle); end; else begin { TODO: Add your uninitalization routines } writeln('Error loading patch file ',Filename); Exit; end; end;
------------
*READ THIS FIRST*
Copy PRINHACK.EXE to your Prince of Persia directory (whatever version you want).
Known Bugs
----------
- When you load the patches it reads them abnormally. When you wrote the changes,
it scrambles up the EXEs' varibles!