PoP1 SEGA Genesis format documentation

Discuss other PoP1 related things here.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

PoP1 SEGA Genesis format documentation

Post by David »

I tried to post this to the Princed Wiki, but submitting does not seem to work, only the preview.
This file is already in wiki format.
Attachments
wiki.txt
(7.91 KiB) Downloaded 152 times
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: PoP1 SEGA Genesis format documentation

Post by David »

I could finally post it: http://www.princed.org/wiki/SEGA_Genesis_format
The problem was that the page would contain external links.
If I recall correctly, some CAPTCHA should appear in that case.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

Hm, so the challenge–response authentication might be broken then.
Probably also prevents Wiki visitors from registering.

Thanks for posting information about the Genesis.
Can you roughly describe how you managed to find out certain things.
For instance, that levels have a width and height.
Specific tools you used?

[Edit: Also, how much time did it take you to figure all this out? It can't be easy to figure out how the graphics are stored?]
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: PoP1 SEGA Genesis format documentation

Post by David »

Norbert wrote:It can't be easy to figure out how the graphics are stored?
I already have programs that can extract full-screen images and some sprites.
I just didn't "convert" them into documentation yet.
I wanted to post levels-related stuff first, and the rest can wait.
Norbert wrote: Can you roughly describe how you managed to find out certain things.
For instance, that levels have a width and height.
Specific tools you used?
I don't remember all the details, because it was so long ago...

I certainly used the file viewer built into Total Commander.
Any hex-editor is good if it shows all bytes as different characters, including 0x00-0x1F, instead of just showing dots.
Example: viewtopic.php?p=14068#p14068
Adjustable width is also necessary.
It's also good if I can scroll in a way that allows any byte to be positioned in the top-left corner. BIEW can do that, for example.

I usually just scroll through the file and search for anything that looks interesting.
Repetitions. Patterns. Things that would look better with a different width.
Various types of binary data are recognizable to the trained eye.

Savestates can also help, especially if a game uses compression. So you can compare the compressed and the decompressed data.
And you can see what data gets into Video RAM: palettes, tiles, maps... so you can search for them in the ROM.

If I know for certain the address where something begins, I can also search for that address.
This might lead to a table of pointers.
It helps if you know the format of pointers on the system. (The SEGA Genesis is pretty straightforward in this respect.)

The table might contain other stuff between the pointers. Like an array of structs with the pointer in one field.
And I try to figure out what the other fields are. In case of the levels, I tried to correlate them with what I saw on the maps.
The level type field was easy to recognize. The level sizes not so, but I think the round numbers helped.
I frequently write programs that dump these in a more readable format.

Or I might search for bytes with given differences between them.
For example, in PoP1 SNES, after I found out the place where level 6 and level 7 begins, I wrote a small program that finds adjacent/nearby numbers whose difference equals the difference between the two addresses.

It might sound strange, but usually I do disassembly only much later.

Okay, this list is probably not complete, but I think you got the idea.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

Thanks; interesting.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

This is a funny tile ("graphics"), because it allows you to see the prince when he's walking through a secret wall passage (floor "object"):

Image
(image mirror)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

Below are level codes for the European version.

- - - - - - - - - -
From: info TA popot TOD org
To: jalaln TA gmail TOD com, marcel TA cheatingdome TOD com
Subject: level codes for "Prince of Persia" for Mega Drive
Date: Thu, 17 Nov 2016 14:38:30 +0100

Hi folks,

From what I could find, literally nobody on the Internet(*) provides a
listing of level codes that can be used with the European version of
the Sega Genesis (a.k.a. Mega Drive) for the game "Prince of Persia".

This European version has 17 levels.
I just finished these, and here are level codes:

l2: BJKTOG
l3: IOPYTS
l4: EJKVYM
l5: LOPAEZ
l6: HJKXIT
l7: OOPFYX
l8: ZYZRSH
l9: KJKDNR
l10: ROPISD
l11: YTUQHI
l12: QJKGXE
l13: TJKKHE
l14: APPSWI
l15: HUUXBV
l16: KUUBMU
l17: RZZJBZ


Best regards,
Norbert

(*) Not IGN, not Neoseeker, not GameRankings, not ChapterCheats, not
RetroCheats, not Cheating Dome, not GameFAQs, not Princed/PoPUW/PoPOT;
nobody.
- - - - - - - - - -
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

Holy smokes Batman! Who knew that the European version of the Sega Genesis port has a level with a potion that stops time to freeze hazards, and another level with a potion that shakes the screen to drop unreachable loose tiles? Be honest, who here knew? I sure didn't.

As you can see I posted a list of passwords for this port above. I think nobody had provided these yet because the European version has 4 extra levels that even most PoP veterans are unfamiliar with, plus if you use cheat codes in any way the game will no longer provide level passwords.

Two graphics are only used in the European version, namely 0x13 and 0xA1. These aren't special though, they aren't fancy decorations or anything like that. (They are in level 6, room x:4, y:2.)
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: PoP1 SEGA Genesis format documentation

Post by salvadorc17 »

David wrote:I could finally post it: http://www.princed.org/wiki/SEGA_Genesis_format
The problem was that the page would contain external links.
If I recall correctly, some CAPTCHA should appear in that case.
Based from that info do you have some editor planned for this version?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

salvadorc17 wrote:Based from that info do you have some editor planned for this version?
I presume you're addressing David, but...
To make sure it's not a complete surprise when it arrives, I am actually working on an editor for this port.
Below is a screenshot of the unfinished program.

Image

Obviously, David will get the credits he deserves.
Still several months away though, so don't hold your breath.
But, yeah, I can already edit the objects and graphics, among other things.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: PoP1 SEGA Genesis format documentation

Post by David »

Norbert wrote:Holy smokes Batman! Who knew that the European version of the Sega Genesis port has a level with a potion that stops time to freeze hazards, and another level with a potion that shakes the screen to drop unreachable loose tiles? Be honest, who here knew? I sure didn't.
I didn't! :shock:
(Well, I feel I have a faint memory of reading something like that... But I haven't seen them myself!)
I played only the USA version, but then I think I should play the European version as well.
(And then the list of potion effects on the doc page needs updating, too...)

So that hidden room in the PC Engine version is not the only hidden surprise...

Another, less surprising difference from the DOS version is that level 12 is not split into two. (Level 16 in the European version.)

The intro also has some differences between US and EU.
Here is a list about them that I made some time ago:

Code: Select all

USA: (Genesis)
Tengen
Prince of Persia *TM*
The game logo + notices appear after some time.
Intro:
	There are (English) texts in the intro. *
	palace from afar (no scrolling *)
	Jaffar at crystal ball
	princess in crystal ball
	prince in crystal ball
	prince in chains *
	hourglass scene
	the princess *
Settings: Sound On/Off
Passwords are different.
Level 1: Standing entry.
After quitting the game: restarts from the game logo, sound test resets
Same levels as the original.

Europe: (MegaDrive)
SEGA, Domark
Prince of Persia *(R)*
The game logo + notices appear immediately.
Intro:
	There are no texts in the intro. *
	palace from afar (with scrolling *)
	palace from near (scroll) *
	Jaffar at crystal ball
	prince in crystal ball
	princess in crystal ball
	prince+princess+guard in crystal ball *
	hourglass scene
Settings: Music and FX / FX Only / Music Only / No Sound
Passwords are different.
When starting the game: The prince is rolled down on the stairs (ouch!), and level 1 starts by falling from the gate.
After quitting the game: restarts from the SEGA logo, sound test stays
Has some additional levels.
I suppose that the "rolled down on the stairs" animation was removed from the US version for the same reason as the torture scene was removed for the non-Japanese SNES versions?
(The release dates in the ROM headers are: US: 1993.NOV, EU: 1994.JAN, i.e. the European version is the newer.)
Norbert wrote:Below is a screenshot of the unfinished program.
Already January? :)
I see it does not show the starting position of the Prince.
I guess I should figure that out as well, sooner or later...
Norbert wrote:l5: LOPAEZ
Heh, almost Lopez. :)
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: PoP1 SEGA Genesis format documentation

Post by David »

Added extra potion effects (of the European version) to the docs: http://www.princed.org/wiki/SEGA_Genesis_format
Also added info about gates that close themselves, like the first gate on level 1 of the European version.
David wrote:(Well, I feel I have a faint memory of reading something like that... But I haven't seen them myself!)
Here it is: http://www.hardcoregaming101.net/prince ... persia.htm
[EDIT on 2018.02.25.: The page moved here: http://hg101.kontek.net/princeofpersia/ ... persia.htm]
Most of all, the Mega Drive version features four all new levels and time extending potions to make up for the longer journey.
They don't write about the stop-time, or shake-screen potions, though...

Here are the locations of the special potions:
Spoiler: show
4 = shake screen -- level 12, under exit door
5 = stop time -- level 7, bottom room
6 = extra time -- level 6, top-right room
7 = extra time -- level 10 (= DOS level 8), after first guard
8 = extra time -- level 12, above chomper in first guard's room
9 = extra time -- level 14 (= DOS level 11), right from starting room
The extra time potions work only once. Otherwise people would simply restart the level and drink them again...
I wonder why are there separate effect codes for each extra time potion.

Level 6 has an unreachable potion and an unreachable guard, by the way.

You can find maps here: http://www.vgmaps.com/Atlas/Genesis/ind ... ceOfPersia
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

Oh, interesting, so it has extra time potions as well.
Too bad for modders though that the shake-screen potion triggers loose tiles in the whole level and not just for the current room.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: PoP1 SEGA Genesis format documentation

Post by David »

Another thing about potions:
The big potions on DOS level 3 and 5 were changed to heal potions. (In both the USA and the Europe version.)

Sure, you can't see (or taste) the difference on level 5, but why the change on level 3?
Maybe they found out how to take the big potion on level 3 twice, and this is how they "fixed" it?

By the way, I could not find any manuals for the SEGA Genesis / Mega Drive version of PoP.

I found this, but it seems to come from the SEGA Master System version's manual.
Especially this part is telltale: "When you start the game, you can choose 1, 2 or 3 units of strength."
It's linked from this page, which has screenshots from the Genesis port.
So I guess they made a mistake.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: PoP1 SEGA Genesis format documentation

Post by Norbert »

David wrote:The big potions on DOS level 3 and 5 were changed to heal potions.
I did notice this for level 3. I was trying to obtain all life potions when I played through the game to make sure the level codes overview I was making would provide passwords that would give players plenty of hit points. (I skipped the thief/shadow room in level 5.)

There are several other interesting differences I noticed. One is that after obtaining the LP in level 4, the prince cannot go back via the top rooms. He has to first kill the guard in the lower room, then obtain the LP, and then take the path to where the guard used to be. I didn't look into why the original path isn't possible, but I think the reason is that the dropped loose tile, that should keep open more than one gate, only keeps open the gate next to the LP. This could mean - again, just speculating - that the game only keeps the first gate open if a loose tile drops on a raise button.

Another thing I noticed is that they moved a loose tile in level 10. The impact of this change is that there's no longer any need to pass the 2-chomper+2-drop obstacle path, which makes this level easier. They also changed loose tiles in level 11, which means it's even easier to obtain the LP there.

Bunch more stuff. There's no sword visible where the shadow will show up in level 12. An empty princess room isn't included in level 13, because the game never shows graphics from the left room. The fat guard is difficult, the first guard in level 8 not so much. Flip potions are missing altogether. I think the mouse keeps standing up in level 8, or at least a lot longer than in the DOS version. No auto-falling loose tiles in level 12. In EU's level 12 there's an empty room near the lower right where you can get stuck forever, with no way to die or escape. By the way, because of the 60 minute time limit and the 4 extra levels of the EU version, players are (obviously) more likely to run out of time.
Post Reply