Points of Required Attention™
Smaghetti, a new Super Mario Advance 4 editor, is currently in development! Check out the thread HERE!

Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,318,188
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 03-29-24 10:49 AM
Guest: Register | Login

0 users currently in ROM Hacking | 1 guest

Main - ROM Hacking - Let's hack NSMB! (To be exact, a level viewer.) New thread | New reply

Pages: 1 2 3 4 5

Treeki
Posted on 07-16-07 12:52 PM Link | Quote | ID: 55406


Red Cheep-cheep
Level: 34

Posts: 9/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
[citation needed]

____________________
I'll put something here later.

Squash Monster
Posted on 07-17-07 10:07 AM Link | Quote | ID: 55636


Buster Beetle
Level: 48

Posts: 251/469
EXP: 802654
Next: 20889

Since: 02-22-07
From: New York

Last post: 5669 days
Last view: 5668 days
This sounds quite awesome. However, I personally won't be able to test it until about a month from now (tears of sadness).

Out of curiosity, however, what kind of format does it use? One of those x/y/ID/size object deals?

____________________

Treeki
Posted on 07-17-07 11:46 AM Link | Quote | ID: 55642


Red Cheep-cheep
Level: 34

Posts: 12/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by Squash Monster
This sounds quite awesome. However, I personally won't be able to test it until about a month from now (tears of sadness).

Out of curiosity, however, what kind of format does it use? One of those x/y/ID/size object deals?

(Yay, someone replied!)
It's simple. Basically, 10 bytes for each object.
2 = Tile type
2 = X
2 = Y
2 = Width
2 = Height
They're encoded as in "(second byte * 256) + first byte".

One thing I have yet to figure out is tilesets. I do know that tiles with 16 as the second byte are part of the level-specific tileset that changes for every level. Once I manage to figure out the normal level file format, I will probably be able to change what tileset a level uses.

NSMB is surprisingly stable- I have only managed to crash it twice, and that was by editing two bytes in A01_1.bin. (The first time, I changed an 01 to 02 and got No$GBA to crash upon entering 1-1. The second time, the level did not appear after the "World 1-1" sign faded out.) I have managed to get some weird glitches like the timer starting at a very low number and glitched BG's, or disappearing tiles that Mario can walk through, but otherwise..

Right now I'm working on a new version which features a more descriptive help window, a better UI, a Zoom function and scrolling.
Whenever I figure out how to determine what tileset a level uses and what tiles correspond to what, I will probably add support for loading tilesets from a PNG file. Since we are quite far off from easy graphics editing in DS games (especially NSMB with its convoluted graphics) I doubt this will be much of a problem.

Just curious, but why can't you try it for about a month?

____________________
I'll put something here later.

Raccoon Sam
Posted on 07-17-07 12:34 PM Link | Quote | ID: 55645


Cobrat
Level: 56

Posts: 284/672
EXP: 1376948
Next: 21228

Since: 02-19-07
From: Hi

Last post: 3439 days
Last view: 2671 days
Oh my asfkjkakshdfffff Nitro Logic all over again, eh?
Nah, just kidding. You did an awesome job, can't wait for the final product!!

____________________


Arbe
Posted on 07-17-07 03:45 PM Link | Quote | ID: 55660

go away
Level: 86

Posts: 59/1788
EXP: 5973978
Next: 168129

Since: 02-23-07

Last post: 4941 days
Last view: 1510 days
Can anyone upload it to somewhere other than sendspace? I'm using it to download Harry Potter 5 xD

Treeki
Posted on 07-17-07 03:48 PM Link | Quote | ID: 55661


Red Cheep-cheep
Level: 34

Posts: 13/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by ArBeWhy
Can anyone upload it to somewhere other than sendspace? I'm using it to download Harry Potter 5 xD

Suggest somewhere I can and I will.

____________________
I'll put something here later.

Arbe
Posted on 07-17-07 03:49 PM Link | Quote | ID: 55662

go away
Level: 86

Posts: 60/1788
EXP: 5973978
Next: 168129

Since: 02-23-07

Last post: 4941 days
Last view: 1510 days
http://rapidshare.com/ =D

Treeki
Posted on 07-17-07 04:18 PM Link | Quote | ID: 55665


Red Cheep-cheep
Level: 34

Posts: 14/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by ArBeWhy
http://rapidshare.com/ =D

http://rapidshare.com/files/43429341/nsmb-level-editor.zip.html

____________________
I'll put something here later.

Arbe
Posted on 07-17-07 04:23 PM Link | Quote | ID: 55667

go away
Level: 86

Posts: 61/1788
EXP: 5973978
Next: 168129

Since: 02-23-07

Last post: 4941 days
Last view: 1510 days
Thanks =D

Smallhacker
Posted on 07-17-07 04:55 PM Link | Quote | ID: 55670


Panser
Swedish weirdo times eleven

Level: 42

Posts: 154/339
EXP: 493373
Next: 27989

Since: 02-19-07
From: Stockholm, Sweden

Last post: 5157 days
Last view: 5156 days
Hey, I can program too!
Screenshot

Yes, it's a real program, based on the information given in this thread and Treeki's program.

Don't expect any more progress from me on this.

____________________
SMW Central

Treeki
Posted on 07-17-07 06:59 PM Link | Quote | ID: 55680


Red Cheep-cheep
Level: 34

Posts: 15/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by Smallhacker
Hey, I can program too!
Screenshot

Yes, it's a real program, based on the information given in this thread and Treeki's program.

Don't expect any more progress from me on this.

Something like that is planned (but in VB) using my NSMB tile rips. I can't do it yet, because I have no way of telling what tileset a level uses.

BTW: Sprite/enemy editing is coming along well. It will probably be in the next update

____________________
I'll put something here later.

GuyPerfect
Posted on 07-17-07 08:29 PM Link | Quote | ID: 55721


Paratroopa
Level: 30

Posts: 98/155
EXP: 152258
Next: 13611

Since: 03-14-07

Last post: 6017 days
Last view: 5966 days
Somewhere buried deep in the confines of my endless data archives, I have the information on the NDS ROM file format, complete with checksum algorithm and FAT specification.

What would be neat is if you would implement a file reader in order to view files directly given the ROM. I'd be willing to help out with that.

Treeki
Posted on 07-17-07 08:43 PM Link | Quote | ID: 55728


Red Cheep-cheep
Level: 34

Posts: 16/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by GuyPerfect
Somewhere buried deep in the confines of my endless data archives, I have the information on the NDS ROM file format, complete with checksum algorithm and FAT specification.

What would be neat is if you would implement a file reader in order to view files directly given the ROM. I'd be willing to help out with that.

I'd be more interested in some information of this stupid level data format. It is seemingly impossible to figure out. I have managed to display some enemies.. but nothing more, and the offset for them must be hardcoded (I need to find an algorithm to get the offset easily)

____________________
I'll put something here later.

Squash Monster
Posted on 07-17-07 10:43 PM Link | Quote | ID: 55748


Buster Beetle
Level: 48

Posts: 253/469
EXP: 802654
Next: 20889

Since: 02-22-07
From: New York

Last post: 5669 days
Last view: 5668 days
Posted by Treeki
(Yay, someone replied!)
It's simple. Basically, 10 bytes for each object.
2 = Tile type
2 = X
2 = Y
2 = Width
2 = Height
They're encoded as in "(second byte * 256) + first byte".
Yay, it's like an easier version of Yoshi's Island. In YI you had that same thing in 5 bytes for some objects and 4 for others. You could tell by object ID, but someone still had to go through and figure out which each ID was. Also, object 0 was a 4 byte object that used its width/height byte as a secondary type byte instead. So object 0 was actually 255 different objects that only had one size. I bet you'll run into something like it.

Posted by Treeki
One thing I have yet to figure out is tilesets. I do know that tiles with 16 as the second byte are part of the level-specific tileset that changes for every level. Once I manage to figure out the normal level file format, I will probably be able to change what tileset a level uses.
Traditionally, there is a level header in front of level that tells it things like what music and tileset to use. With this file-based system, however, it might either be the first few bytes of the file or something in a completely different file. Judging by the filename, it's probably the later. I'll go take a look inside the ROM in a bit though.

Posted by Treeki
Just curious, but why can't you try it for about a month?
Last I checked, there weren't any working DS emulators, so the only way to do this is with a flash cart. I personally don't have one, but when I move into my apartment one of my roommates will. And I know she'll be interested in this enough to let me borrow it.

____________________

Treeki
Posted on 07-17-07 11:10 PM Link | Quote | ID: 55754


Red Cheep-cheep
Level: 34

Posts: 17/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by Squash Monster
Posted by Treeki
(Yay, someone replied!)
It's simple. Basically, 10 bytes for each object.
2 = Tile type
2 = X
2 = Y
2 = Width
2 = Height
They're encoded as in "(second byte * 256) + first byte".
Yay, it's like an easier version of Yoshi's Island. In YI you had that same thing in 5 bytes for some objects and 4 for others. You could tell by object ID, but someone still had to go through and figure out which each ID was. Also, object 0 was a 4 byte object that used its width/height byte as a secondary type byte instead. So object 0 was actually 255 different objects that only had one size. I bet you'll run into something like it.

Posted by Treeki
One thing I have yet to figure out is tilesets. I do know that tiles with 16 as the second byte are part of the level-specific tileset that changes for every level. Once I manage to figure out the normal level file format, I will probably be able to change what tileset a level uses.
Traditionally, there is a level header in front of level that tells it things like what music and tileset to use. With this file-based system, however, it might either be the first few bytes of the file or something in a completely different file. Judging by the filename, it's probably the later. I'll go take a look inside the ROM in a bit though.

Posted by Treeki
Just curious, but why can't you try it for about a month?
Last I checked, there weren't any working DS emulators, so the only way to do this is with a flash cart. I personally don't have one, but when I move into my apartment one of my roommates will. And I know she'll be interested in this enough to let me borrow it.

There weren't any working DS emulators? What rock have you been living under for so long?
No$GBA has been able to run NSMB for ages. Recently, support for it has improved much. I don't have a flashcart, which is why I must use an emulator.
The graphics are almost perfect, with only a few missing things like the background on the map screen and the rainbow texture on Star Mario (he looks white).
I do know level headers and such are stored in the A_##_#.bin files. (The background data this editor uses is stored in A_##_#_bgdat.bin files.) I have enemy displaying working, but right now, the offset for each level must be manually entered, which is why I haven't released it yet. (The format is not too complicated for each enemy/sprite/etc - 12 bytes. First 2 are type, next 2 are X, next 2 are Y. Haven't figured out what the rest do; likely specific data for some which require more info.)
There seem to be some objects with weird positions, though (control objects, possibly?) The level time limits are also in the same 2-byte format, at offset 0x74 in the file.
I actually managed to do this by making a few values in A_01_1.bin the same as in A_02_1.bin:

The thing is that NSMB's level header format is rather weird.
From an MSN conversation describing it:

(15:18:33) Treek: The really weird thing is that some of these seem to follow a pattern, so I may be on to something
(15:28:47) Treek: Near the start of the file, I start seeing a pattern
(15:29:38) Treek: Every 4 bytes are a number (the second 2 always seem to be 00 though).
(15:30:16) Treek: Every 8 bytes are two of those. The first is a number (let's call it A), the second is another (let's call it B). A + B = A in the next 8-byte string. And so on it goes, for some time.
(15:32:09) Treek: You can see different strings of this pattern in every level I could find
(15:33:33) Treek: Here's an example from one of the unused levels:
112 + 32 144 + 24 168 + 20 188 + 20 208 + 20 228 + 80 308 + 508 816 + 32 848 + 12 860 + 16 876 + 0 876 + 64 940 + 0 940 + 16
(15:33:51) Treek: Then it changes to 256 + 500 6 + 6 and so on

There are also a metric ton of FF's littered in random lengths around the file.

____________________
I'll put something here later.

Dwedit
Posted on 07-18-07 02:19 PM Link | Quote | ID: 55897


Red Paratroopa
Level: 30

Posts: 85/162
EXP: 162776
Next: 3093

Since: 03-07-07
From: Chicago

Last post: 3490 days
Last view: 1585 days
I fail to see what that nintendo DS game has to do with bike theft.

____________________

Treeki
Posted on 07-18-07 02:35 PM Link | Quote | ID: 55899


Red Cheep-cheep
Level: 34

Posts: 18/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by Dwedit
I fail to see what that nintendo DS game has to do with bike theft.

Is this supposed to be a joke post? Because I do not see where your comment about "bike theft" is coming from.

____________________
I'll put something here later.

Ailure
Posted on 07-18-07 03:16 PM Link | Quote | ID: 55907

Hats
Steam Board2 group
Level: 121

Posts: 1132/3965
EXP: 19735002
Next: 321694

Since: 02-19-07
From: Sweden, Skåne

Last post: 3273 days
Last view: 2024 days
Nigga Stoly My Bike. A internet fad, based on the NES game Punch out.

Usually shortened as NSMB.

____________________
AIM: gamefreak1337, MSN: Emil_sim@spray.se, XMPP: ailure@xmpp.kafuka.org


Treeki
Posted on 07-18-07 03:39 PM Link | Quote | ID: 55913


Red Cheep-cheep
Level: 34

Posts: 19/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted by Ailure
Nigga Stoly My Bike. A internet fad, based on the NES game Punch out.

Usually shortened as NSMB.

Oh.. I've never seen it before.


____________________
I'll put something here later.

Treeki
Posted on 07-19-07 04:53 PM Link | Quote | ID: 56242


Red Cheep-cheep
Level: 34

Posts: 20/209
EXP: 236074
Next: 17577

Since: 07-12-07
From: Rogueport

Last post: 3900 days
Last view: 3601 days
Posted an update! Some new features, a new UI, and more.

____________________
I'll put something here later.
Pages: 1 2 3 4 5


Main - ROM Hacking - Let's hack NSMB! (To be exact, a level viewer.) New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.077 seconds. (348KB of memory used)
MySQL - queries: 112, rows: 151/152, time: 0.052 seconds.