Snes level editor single level format hex editing

A modern Prince of Persia 1 for SNES level editor for Windows.

Moderator: English Moderator Team

Post Reply
salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Snes level editor single level format hex editing

Post by salvadorc17 » July 29th, 2016, 10:50 pm

Here i will post my info about what i can found in exported levels by Prince Snes Level Editor.
I will hex edit this files, Daiv or someone else, if you know more documentation about this, please give me some help. The main purpose of this is convert snes level layout( basic tiles only) to Pc Dos version. (using xml format)
Last edited by salvadorc17 on July 30th, 2016, 5:01 pm, edited 1 time in total.

David
The Prince of Persia
The Prince of Persia
Posts: 1478
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Snes level editor single level format hex editing

Post by David » July 30th, 2016, 11:20 am

You can find the format of SNES levels here: http://www.princed.org/wiki/SNES_format#Levels

salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Re: Snes level editor single level format hex editing

Post by salvadorc17 » July 30th, 2016, 4:59 pm

Wow thanks, that help me doing faster the process of parsing the level with my converter tool..

Edit: Need some help for understanding, why the object type does not place consecutively in the adress.
Like for example in my file room 0 tile 14 is chomper floor.
So adresss 0x2dd is floor type.
But the adress for object chomper is assigned to 0xa71 (0x0c)

So the question is why the adress for object is not the 14 byte (tile) after 0xa70?

David
The Prince of Persia
The Prince of Persia
Posts: 1478
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Snes level editor single level format hex editing

Post by David » July 31st, 2016, 8:45 am

Because address 0x2DD contains a block index, not the object type.
Address 0xA71 stores what object belongs to block 0x01.
(So I guess the byte at address 0x2DD is 0x01?)

salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Re: Snes level editor single level format hex editing

Post by salvadorc17 » July 31st, 2016, 10:32 pm

David wrote:Because address 0x2DD contains a block index, not the object type.
Address 0xA71 stores what object belongs to block 0x01.
(So I guess the byte at address 0x2DD is 0x01?)

Yes, is assigned to chomper the block index 01, so i can change wich object is assigned to each block index?? So which is the default value of each block index??

Im having this values for block index:

Code: Select all

	none = 00,
        chomper = 01,
        floor = 02,
        column = 03,
        sword = 04,
        door = 0x11,
        door1 = 0x12,
        torchb = 0x77,
        loose = 0xce,
        spike = 0xd2,
        healpotion = 0xd5

David
The Prince of Persia
The Prince of Persia
Posts: 1478
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Snes level editor single level format hex editing

Post by David » August 7th, 2016, 10:28 am

salvadorc17 wrote:Yes, is assigned to chomper the block index 01, so i can change wich object is assigned to each block index?? So which is the default value of each block index??
The "block objects" part, at offsets 0xA70..0xB6F, is exactly about this.

salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Re: Snes level editor single level format hex editing

Post by salvadorc17 » August 8th, 2016, 12:41 am

David wrote:
salvadorc17 wrote: The "block objects" part, at offsets 0xA70..0xB6F, is exactly about this.
Ok, you have tried Norbert converter??, seems some tiles are missing and being ignored, mostly for demo level and other traps.

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3125
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Snes level editor single level format hex editing

Post by Norbert » August 8th, 2016, 1:11 am

salvadorc17 wrote:Ok, you have tried Norbert converter??, seems some tiles are missing and being ignored, mostly for demo level and other traps.
Please give me examples, because then I can improve the program if necessary.
Thanks.

salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Re: Snes level editor single level format hex editing

Post by salvadorc17 » August 10th, 2016, 9:21 pm

Norbert wrote: Please give me examples, because then I can improve the program if necessary.
Thanks.
I mean how are handled demo level tiles for like example balcony, and also for the missing traps in prince Dos (fire, crusher, etc)

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3125
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Snes level editor single level format hex editing

Post by Norbert » August 10th, 2016, 9:52 pm

salvadorc17 wrote:I mean how are handled demo level tiles for like example balcony, and also for the missing traps in prince Dos (fire, crusher, etc)
I don't know what you mean by "balcony".

If you look in xml/warnings.txt then you can see how things are handled.
You will for example see...

"Converted fire to chomper."
"Converted crusher to chomper."

salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Re: Snes level editor single level format hex editing

Post by salvadorc17 » August 11th, 2016, 9:09 pm

Norbert wrote:
I don't know what you mean by "balcony".

I mean this demo tiles.

Image

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 3125
Joined: April 9th, 2009, 10:58 pm
Contact:

Re: Snes level editor single level format hex editing

Post by Norbert » August 11th, 2016, 9:34 pm

salvadorc17 wrote:
Norbert wrote:I don't know what you mean by "balcony".
I mean this demo tiles.
Okay.

Well, if you look at a comparison (mirror), it may seem as if snes2dosxml creates floors on the left where it should add more walls for the tower.

However, if you press "i" you see the tile information, and then the comparison (mirror) shows you that indeed the attributes for these tiles are set to floor (F = floor, S = space, W = wall).

This should mean you can walk inside the tower, which is indeed possible (mirror).

And the balustrade on the floor on the right consists of tiles that do not exist for DOS.

Does this answer your question(s)?

salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Re: Snes level editor single level format hex editing

Post by salvadorc17 » August 12th, 2016, 9:42 pm

Norbert wrote:
And the balustrade on the floor on the right consists of tiles that do not exist for DOS.

Does this answer your question(s)?
Yes, no problem, this solves the question.

Post Reply