Register - Login
Views: 99795157
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 05:23:07 AM
Jul - General Game/ROM Hacking - Using generic tile map editors as NES level editors? New poll - New thread - New reply
Next newer thread | Next older thread
messiaen
Catgirl
Level: 68


Posts: 372/1085
EXP: 2596318
For next: 132482

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 11-02-08 07:15:37 PM (last edited by messiaen at 11-03-08 05:11 PM) Link | Quote
Hi, I was taking a look at Tile Studio, Mappy and others tile map editors and I was wondering if has anybody tried using them as interfaces for simple NES level editors.

I did a quick test using the Yo-Noid! NES game with some interesting results. I first modified one level data so that I got a sequencial display of the tiles, then took a screenshot to import it into Tile Studio 3.

After creating a simple map, I exported it as an array, but the output was a bit different than what I needed. Instead of saving my tiles from top to bottom (the whole map was 128 x 7), it saves starting from "top to right" (I hope that makes any sense). I used a simple custom program to correct this and then just overwrote the level data to get my custom level (no screenshots because it's too ugly).

Just curious if has anybody done something similar, this seems interesting for editing levels with simple formats in a visual way without having to write a whole editor.

Edit: A screenshot:



____________________
Mario 64 notes @ http://sites.google.com/site/messiaen64/
ReiNi
さよなら*へヴン
Level: 124


Posts: 1219/4444
EXP: 21769050
For next: 67551

Since: 07-21-07


Since last post: 6.7 years
Last activity: 3.3 years

Posted on 11-06-08 08:13:42 PM (last edited by Reimu at 11-06-08 05:18 PM) Link | Quote
Every of us has a little ⑨ inside.
----------------------------
This'd be a good idea for games with everything documented so you can see what you are doing, sort of.

However I think it'd deppend much on the level format. I don't think this'd work at all with a format like the one blaster master or gradius have, for example. (the levels divided on screens, which are divided themselves into other pieces, which are also divided in groups of tiles. Unless there ARE tile map editors that can deal with that...).

____________________

Stevoisiak
Member
Level: 38


Posts: 151/283
EXP: 345780
For next: 24667

Since: 11-22-07

From: New York, Long Island

Since last post: 12.4 years
Last activity: 5.6 years

Posted on 11-07-08 08:59:28 PM Link | Quote
Originally posted by Reimu
I don't think this'd work at all with a format like the one blaster master or gradius have, for example. (the levels divided on screens, which are divided themselves into other pieces, which are also divided in groups of tiles.

Well, sure this teqnique may not work for EVERY game, but it seems it may be as close to a universal NES level editor as it's gonna get.
ReiNi
さよなら*へヴン
Level: 124


Posts: 1223/4444
EXP: 21769050
For next: 67551

Since: 07-21-07


Since last post: 6.7 years
Last activity: 3.3 years

Posted on 11-07-08 09:03:02 PM (last edited by Reimu at 11-07-08 06:04 PM) Link | Quote
Every of us has a little ⑨ inside.
----------------------------
Well, what I am trying to say is that it will work with very few of them...

But now that I think of it it might be still useful for still editing many aspects of levels or other stuff graphically...

____________________

Stevoisiak
Member
Level: 38


Posts: 152/283
EXP: 345780
For next: 24667

Since: 11-22-07

From: New York, Long Island

Since last post: 12.4 years
Last activity: 5.6 years

Posted on 11-07-08 09:13:42 PM Link | Quote
Originally posted by Reimu
Well, what I am trying to say is that it will work with very few of them...

But now that I think of it it might be still useful for still editing many aspects of levels or other stuff graphically...

Well most editors work with 1 game, so this is a pretty big step ahead. Plus, like you said, if it cannot edit the level, it can change the textures.
messiaen
Catgirl
Level: 68


Posts: 381/1085
EXP: 2596318
For next: 132482

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 11-08-08 02:01:30 PM Link | Quote
Since this specific game (Yo-Noid) uses a very simple format, it seemed like an interesting solution. Mappy and Tile Studio are open source, so maybe after getting rid of the functions I don't want and changing a bit the Export Map function it could suit the specific needs of this game.

By the way, sorry if this goes a bit off-topic, but I was wondering how people usually export tilesets from a NES ROM. I'm an absolute begginner when it comes to NES Hacking, but I guess I would need to find the TSA/palletes for each level. Is there someting like a standard (or at least common) TSA format? Last time I tried finding in the ROM for something like "0x40 0x41, 0x50, 0x51", which seemed in the PPU to be a specific tile-combination to get one of the 32x32 blocks. Is this the way to go?

____________________
Mario 64 notes @ http://sites.google.com/site/messiaen64/
wowfunhappy
Member
Level: 16


Posts: 33/40
EXP: 18502
For next: 1754

Since: 09-10-07


Since last post: 13.0 years
Last activity: 13.0 years

Posted on 11-08-08 10:31:57 PM Link | Quote
Messiaen, Rather than try to fix up the tile map editor so that it's suitable for Yo-Noid, perhaps you could expand on the idea of a multi-game level editor and make the tile map editor somewhat more user friendly. (For example, I'd certainly enjoy using such an editor, even if the game capability is very low. However, I have no idea how to do that stuff you discuss in the first post in order to make the editor work)
Darkdata
Ruins!? ♥
Level: 103


Posts: 731/2892
EXP: 11445980
For next: 25426

Since: 07-04-07


Since last post: 202 days
Last activity: 10 days

Posted on 11-12-08 06:46:14 PM Link | Quote
Originally posted by messiaen
Last time I tried finding in the ROM for something like "0x40 0x41, 0x50, 0x51", which seemed in the PPU to be a specific tile-combination to get one of the 32x32 blocks. Is this the way to go?


That is how I did it.

Lets look at Mario for example...

Disassembly Paste:

Palette0_MTiles:
.db $24, $24, $24, $24 ;blank
.db $27, $27, $27, $27 ;black metatile
.db $24, $24, $24, $35 ;bush left
.db $36, $25, $37, $25 ;bush middle
.db $24, $38, $24, $24 ;bush right
.db $24, $30, $30, $26 ;mountain left
.db $26, $26, $34, $26 ;mountain left bottom/middle center
.db $24, $31, $24, $32 ;mountain middle top
.db $33, $26, $24, $33 ;mountain right
.db $34, $26, $26, $26 ;mountain right bottom
.db $26, $26, $26, $26 ;mountain middle bottom
.db $24, $c0, $24, $c0 ;bridge guardrail
.db $24, $7f, $7f, $24 ;chain
.db $b8, $ba, $b9, $bb ;tall tree top, top half
.db $b8, $bc, $b9, $bd ;short tree top
.db $ba, $bc, $bb, $bd ;tall tree top, bottom half
.db $60, $64, $61, $65 ;warp pipe end left, points up
.db $62, $66, $63, $67 ;warp pipe end right, points up
.db $60, $64, $61, $65 ;decoration pipe end left, points up
.db $62, $66, $63, $67 ;decoration pipe end right, points up
.db $68, $68, $69, $69 ;pipe shaft left
.db $26, $26, $6a, $6a ;pipe shaft right
.db $4b, $4c, $4d, $4e ;tree ledge left edge
.db $4d, $4f, $4d, $4f ;tree ledge middle
.db $4d, $4e, $50, $51 ;tree ledge right edge
.db $6b, $70, $2c, $2d ;mushroom left edge
.db $6c, $71, $6d, $72 ;mushroom middle
.db $6e, $73, $6f, $74 ;mushroom right edge
.db $86, $8a, $87, $8b ;sideways pipe end top
.db $88, $8c, $88, $8c ;sideways pipe shaft top
.db $89, $8d, $69, $69 ;sideways pipe joint top
.db $8e, $91, $8f, $92 ;sideways pipe end bottom
.db $26, $93, $26, $93 ;sideways pipe shaft bottom
.db $90, $94, $69, $69 ;sideways pipe joint bottom
.db $a4, $e9, $ea, $eb ;seaplant
.db $24, $24, $24, $24 ;blank, used on bricks or blocks that are hit
.db $24, $2f, $24, $3d ;flagpole ball
.db $a2, $a2, $a3, $a3 ;flagpole shaft
.db $24, $24, $24, $24 ;blank, used in conjunction with vines

Palette1_MTiles:
.db $a2, $a2, $a3, $a3 ;vertical rope
.db $99, $24, $99, $24 ;horizontal rope
.db $24, $a2, $3e, $3f ;left pulley
.db $5b, $5c, $24, $a3 ;right pulley
.db $24, $24, $24, $24 ;blank used for balance rope
.db $9d, $47, $9e, $47 ;castle top
.db $47, $47, $27, $27 ;castle window left
.db $47, $47, $47, $47 ;castle brick wall
.db $27, $27, $47, $47 ;castle window right
.db $a9, $47, $aa, $47 ;castle top w/ brick
.db $9b, $27, $9c, $27 ;entrance top
.db $27, $27, $27, $27 ;entrance bottom
.db $52, $52, $52, $52 ;green ledge stump
.db $80, $a0, $81, $a1 ;fence
.db $be, $be, $bf, $bf ;tree trunk
.db $75, $ba, $76, $bb ;mushroom stump top
.db $ba, $ba, $bb, $bb ;mushroom stump bottom
.db $45, $47, $45, $47 ;breakable brick w/ line
.db $47, $47, $47, $47 ;breakable brick
.db $45, $47, $45, $47 ;breakable brick (not used)
.db $b4, $b6, $b5, $b7 ;cracked rock terrain
.db $45, $47, $45, $47 ;brick with line (power-up)
.db $45, $47, $45, $47 ;brick with line (vine)
.db $45, $47, $45, $47 ;brick with line (star)
.db $45, $47, $45, $47 ;brick with line (coins)
.db $45, $47, $45, $47 ;brick with line (1-up)
.db $47, $47, $47, $47 ;brick (power-up)
.db $47, $47, $47, $47 ;brick (vine)
.db $47, $47, $47, $47 ;brick (star)
.db $47, $47, $47, $47 ;brick (coins)
.db $47, $47, $47, $47 ;brick (1-up)
.db $24, $24, $24, $24 ;hidden block (1 coin)
.db $24, $24, $24, $24 ;hidden block (1-up)
.db $ab, $ac, $ad, $ae ;solid block (3-d block)
.db $5d, $5e, $5d, $5e ;solid block (white wall)
.db $c1, $24, $c1, $24 ;bridge
.db $c6, $c8, $c7, $c9 ;bullet bill cannon barrel
.db $ca, $cc, $cb, $cd ;bullet bill cannon top
.db $2a, $2a, $40, $40 ;bullet bill cannon bottom
.db $24, $24, $24, $24 ;blank used for jumpspring
.db $24, $47, $24, $47 ;half brick used for jumpspring
.db $82, $83, $84, $85 ;solid block (water level, green rock)
.db $24, $47, $24, $47 ;half brick (???)
.db $86, $8a, $87, $8b ;water pipe top
.db $8e, $91, $8f, $92 ;water pipe bottom
.db $24, $2f, $24, $3d ;flag ball (residual object)

Palette2_MTiles:
.db $24, $24, $24, $35 ;cloud left
.db $36, $25, $37, $25 ;cloud middle
.db $24, $38, $24, $24 ;cloud right
.db $24, $24, $39, $24 ;cloud bottom left
.db $3a, $24, $3b, $24 ;cloud bottom middle
.db $3c, $24, $24, $24 ;cloud bottom right
.db $41, $26, $41, $26 ;water/lava top
.db $26, $26, $26, $26 ;water/lava
.db $b0, $b1, $b2, $b3 ;cloud level terrain
.db $77, $79, $77, $79 ;bowser's bridge

Palette3_MTiles:
.db $53, $55, $54, $56 ;question block (coin)
.db $53, $55, $54, $56 ;question block (power-up)
.db $a5, $a7, $a6, $a8 ;coin
.db $c2, $c4, $c3, $c5 ;underwater coin
.db $57, $59, $58, $5a ;empty block
.db $7b, $7d, $7c, $7e ;axe


Sprites are a little different:
Disassembly Paste:

;tiles arranged in top left, right, middle left, right, bottom left, right order
EnemyGraphicsTable:
.db $fc, $fc, $aa, $ab, $ac, $ad ;buzzy beetle frame 1
.db $fc, $fc, $ae, $af, $b0, $b1 ; frame 2
.db $fc, $a5, $a6, $a7, $a8, $a9 ;koopa troopa frame 1 X
.db $fc, $a0, $a1, $a2, $a3, $a4 ; frame 2
.db $69, $a5, $6a, $a7, $a8, $a9 ;koopa paratroopa frame 1 X
.db $6b, $a0, $6c, $a2, $a3, $a4 ; frame 2
.db $fc, $fc, $96, $97, $98, $99 ;spiny frame 1
.db $fc, $fc, $9a, $9b, $9c, $9d ; frame 2
.db $fc, $fc, $8f, $8e, $8e, $8f ;spiny's egg frame 1
.db $fc, $fc, $95, $94, $94, $95 ; frame 2
.db $fc, $fc, $dc, $dc, $df, $df ;bloober frame 1 X
.db $dc, $dc, $dd, $dd, $de, $de ; frame 2
.db $fc, $fc, $b2, $b3, $b4, $b5 ;cheep-cheep frame 1 X
.db $fc, $fc, $b6, $b3, $b7, $b5 ; frame 2
.db $fc, $fc, $70, $71, $72, $73 ;goomba
.db $fc, $fc, $6e, $6e, $6f, $6f ;koopa shell frame 1 (upside-down) a6a7a8a9
.db $fc, $fc, $6d, $6d, $6f, $6f ; frame 2
.db $fc, $fc, $6f, $6f, $6e, $6e ;koopa shell frame 1 (rightsideup)
.db $fc, $fc, $6f, $6f, $6d, $6d ; frame 2
.db $fc, $fc, $f4, $f4, $f5, $f5 ;buzzy beetle shell frame 1 (rightsideup)
.db $fc, $fc, $f4, $f4, $f5, $f5 ; frame 2
.db $fc, $fc, $f5, $f5, $f4, $f4 ;buzzy beetle shell frame 1 (upside-down)
.db $fc, $fc, $f5, $f5, $f4, $f4 ; frame 2
.db $fc, $fc, $fc, $fc, $ef, $ef ;defeated goomba
.db $b9, $b8, $bb, $ba, $bc, $bc ;lakitu frame 1
.db $fc, $fc, $bd, $bd, $bc, $bc ; frame 2
.db $7a, $7b, $da, $db, $d8, $d8 ;princess ff00ff00ff00
.db $cd, $cd, $ce, $ce, $cf, $cf ;mushroom retainer FD00FD00FD00
.db $7d, $7c, $d1, $8c, $d3, $d2 ;hammer bro frame 1
.db $7d, $7c, $89, $88, $8b, $8a ; frame 2
.db $d5, $d4, $e3, $e2, $d3, $d2 ; frame 3
.db $d5, $d4, $e3, $e2, $8b, $8a ; frame 4
.db $e5, $e5, $e6, $e6, $eb, $eb ;piranha plant frame 1 X
.db $ec, $ec, $ed, $ed, $ee, $ee ; frame 2
.db $fc, $fc, $d0, $d0, $d7, $d7 ;podoboo
.db $bf, $be, $c1, $c0, $c2, $fc ;bowser front frame 1
.db $c4, $c3, $c6, $c5, $c8, $c7 ;bowser rear frame 1
.db $bf, $be, $ca, $c9, $c2, $fc ; front frame 2
.db $c4, $c3, $c6, $c5, $cc, $cb ; rear frame 2
.db $fc, $fc, $e8, $e7, $ea, $e9 ;bullet bill
.db $f2, $f2, $f3, $f3, $f2, $f2 ;jumpspring frame 1
.db $f1, $f1, $f1, $f1, $fc, $fc ; frame 2
.db $f0, $f0, $fc, $fc, $fc, $fc ; frame 3



So yeah, I think that could help you.. maybe..

____________________
messiaen
Catgirl
Level: 68


Posts: 396/1085
EXP: 2596318
For next: 132482

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 11-14-08 06:46:19 PM Link | Quote
Thanks, looking at a well documented game will probably be better for me now than anything else. Any recommendations on good documents about PPU/tiles/pattern tables/palletes are welcome .

____________________
Mario 64 notes @ http://sites.google.com/site/messiaen64/
Darkdata
Ruins!? ♥
Level: 103


Posts: 734/2892
EXP: 11445980
For next: 25426

Since: 07-04-07


Since last post: 202 days
Last activity: 10 days

Posted on 11-14-08 08:05:55 PM Link | Quote
Originally posted by messiaen
Thanks, looking at a well documented game will probably be better for me now than anything else. Any recommendations on good documents about PPU/tiles/pattern tables/palletes are welcome .


I would just say the "newbie" (lies) pack on romhacking dot net would be good. (You got SM64, I know you can handle this.)

Also, there is a open source tile editor for SMB1 that does palettes, and metatiles... one sec...

Here it is

____________________
messiaen
Catgirl
Level: 68


Posts: 403/1085
EXP: 2596318
For next: 132482

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 11-20-08 08:36:57 PM Link | Quote
Thanks, I think I got how the TSA works. I've tinkered a bit with "Bucky O'Hare" (great Konami platformer) and the first data I stumbled upon was TSA (in this game it's 4x4 'macro' blocks), so I took some time to experiment with it.

I am still confuse about the NES memory layout/banks. Is most game code copied and executed from RAM (like N64) or does it gets executed from the ROM also?

____________________
Mario 64 notes @ http://sites.google.com/site/messiaen64/
Xkeeper

Level: 263


Posts: 8151/25353
EXP: 297139126
For next: 1821327

Since: 07-03-07

Pronouns: they/them/????????

Since last post: 3 days
Last activity: 28 min.

Posted on 11-20-08 09:38:26 PM Link | Quote
Originally posted by messiaen
I am still confuse about the NES memory layout/banks. Is most game code copied and executed from RAM (like N64) or does it gets executed from the ROM also?

It is almost all in ROM, although... well, it works like this:

ROM is mapped to 0x8000-0xFFFF (afaik). This can be swapped out by games to give more than 0x8000 bytes of ROM.

However, sometimes code will be put into RAM and executed from there, since you can modify the instructions it executes without resorting to a billion branches and such.

____________________


Homepage (project updates, etc)
messiaen
Catgirl
Level: 68


Posts: 406/1085
EXP: 2596318
For next: 132482

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 11-23-08 05:40:30 PM Link | Quote
Right, slowly it's making more sense. I do have a few more begginer NES questions.

First, about pointers. Why are they inverted ? Is it some endianness issue (but then, shouldn't the whole ROM have the same byte order) ? Also, how do I make sense of this:

For Bucky O'Hare, each "screen" is composed of 8 x 6 (x,y) tiles, that is 0x30 bytes. Before the level data starts, there is a list of pointer for each screen (it saves a lot data when there are repeated screens for scroll levels).

For the first level, whose tiles begin at 0x8B00 (+10 if you count the header), it goes like this: 0x008B, 0x308B, 0x608B. Basically 0x8B00 + 30. So, it's an absolute offset.

But in a later level, whose tiles begin at 0xCB88, the pointers goes like this: 0x888B, 0xB88B, 0x888B. So, they are all offset by 0x4000 (the size of one PRG bank?).

Is this because of bank-switching, different addressing modes or what? Why aren't pointers from other levels also relative like this one? Also, from this data, is there an quick way to find the code that loads level data? I really want to explore the ASM side to locate data more easily.

Also, about headers. It's a pain having to remember all the time to do +10 or -10 for pointers, is there a simple way to strip the header so I can work with a headerless ROMS? Just butchering the first 0x10 bytes in the ROM didn't work, so I guess there's a less primitive approach to it.

____________________
Mario 64 notes @ http://sites.google.com/site/messiaen64/
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - Using generic tile map editors as NES level editors? New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

30 database queries, 5 query cache hits.
Query execution time: 0.093476 seconds
Script execution time: 0.026196 seconds
Total render time: 0.119672 seconds