Register - Login
Views: 86586348
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies
10-22-17 06:07:06 AM

Jul - NSMB Hacking (Archive) - Original NSMB Hacking Thread (Archived) New poll - New thread - New reply
Pages: 1 2 3 4 5 6 7 8 9 10 ... 22 23 24 25 26 27 28 29 30 31Next newer thread
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 395/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-08-09 09:56:02 AM Link | Quote
You know.. the reversed thing seems like it uses signed numbers. It would make sense seeing everything you've mentioned, including the reordering and such.

With signed numbers, negative numbers start off from FF FF FF FF.

Example:

2 = 02 00 00 00
1 = 01 00 00 00
0 = 00 00 00 00
-1 = FF FF FF FF
-2 = FE FF FF FF
-3 = FD FF FF FF
and so on

This defines it: http://en.wikipedia.org/wiki/Two's_complement
Basically, 80 00 00 00 is the lowest (equal to -2147483648 I believe) and 7F FF FF FF is the highest (equal to 2147483647). I hope this makes them a lot clearer.
messiaen
Catgirl
Level: 64


Posts: 619/1085
EXP: 2151379
For next: 62718

Since: 11-20-07


Since last post: 3.0 years
Last activity: 2.0 years

Posted on 07-08-09 10:44:43 AM Link | Quote
Originally posted by Treeki
With signed numbers, negative numbers start off from FF FF FF FF.

Example:

2 = 02 00 00 00
1 = 01 00 00 00
0 = 00 00 00 00
-1 = FF FF FF FF
-2 = FE FF FF FF
-3 = FD FF FF FF
and so on


Just to make it clearer, its important to take in account the size of an integer when dealing with signed numbers (the table Trekki posted looks a bit confuse since it uses 32 bits but the examples are of 8 bits ingeters).

If the integer size is one byte, 0x00 up to 0x7F (127) will be posive and 0xFF (-1) down to 0x80 (-127) will be negative. So:

In a 8 bits ingeter:
1 = 01
2 = 02
3 = 03
-1 = FF
-2 = FE
-3 = FC

In a 16 bits integer:
1 = 00 01
2 = 00 02
3 = 00 03
-1 = FF FF
-2 = FF FE
-3 = FF FD

In a 32 bits integer:

1 = 00 00 00 01
2 = 00 00 00 02
3 = 00 00 00 03
-1 = FF FF FF FF
-2 = FF FF FF FE
-3 = FF FF FF FD
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 396/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-08-09 10:57:30 AM Link | Quote
The AA/BB/CC/DD values Garmichael referred to are all 4-byte integers, despite what he mentioned - this gives it away:
Originally posted by Garmichael
With AA and BB, first, there are a few curious effects. I've mentioned this one before, but ill re-mention that any value A0 and higher must be followed by 6 F's, and any value lower than that must be followed by 6 0's.

Also, the actual game data uses them, as seen here for the first few levels:

World 1-1 area 1: F0FF FFFF E0FF FFFF 0000 0000 F0FF FFFF 0000 0000 0000 0000
World 1-1 area 2: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0F00 0000 0000
World 1-1 area 3: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
World 1-2 area 1: 4400 0000 2000 0000 0000 0000 0000 0000 0000 0F00 0000 0000
World 1-2 area 2: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
World 1-2 area 3: 4400 0000 2000 0000 0000 0000 0000 0000 0000 0F00 0000 0000
World 1-3: FCFF FFFF E0FF FFFF FCFF FFFF D4FF FFFF 0000 0000 0000 0000

Hiccup
Member
Disgustingly Naive Smartass
Level: 53


Posts: 64/728
EXP: 1089714
For next: 67405

Since: 05-19-09


Since last post: 4 days
Last activity: 1 hour

Posted on 07-08-09 11:38:05 AM Link | Quote
Treeki i made this level and when i played it it ---- i was on the map i go on to the level and it just jams at a black screen, i will post the level here:

http://www.mediafire.com/download.php?n5zutzzqfdg
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 397/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-08-09 12:04:54 PM Link | Quote
Have you messed with anything in the hex editor? I can't think of anything in the level itself that could cause it to crash..
Hiccup
Member
Disgustingly Naive Smartass
Level: 53


Posts: 65/728
EXP: 1089714
For next: 67405

Since: 05-19-09


Since last post: 4 days
Last activity: 1 hour

Posted on 07-08-09 12:13:09 PM Link | Quote
Originally posted by Treeki
Have you messed with anything in the hex editor? I can't think of anything in the level itself that could cause it to crash..


no just the tilesets, area 1 is 1-1 area 3, area 2 and 3 is 2-5 area 1
Ehm
Member
Level: 46


Posts: 56/532
EXP: 677934
For next: 33840

Since: 06-13-09
From: Canada

Since last post: 145 days
Last activity: 103 days

Posted on 07-08-09 12:15:36 PM Link | Quote
Hypothetically, a program or game can crash when there's no end-of-file marker. I've noticed you got rid of all sprites and objects. This also deletes sprite 32, the flagpole sprite. Also, you should put in a castle with the other two parts. Without them, Mario will keep walking and the level won't end. @.@
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 398/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-08-09 12:20:21 PM Link | Quote
Originally posted by m64m
Hypothetically, a program or game can crash when there's no end-of-file marker. I've noticed you got rid of all sprites and objects. This also deletes sprite 32, the flagpole sprite. Also, you should put in a castle with the other two parts. Without them, Mario will keep walking and the level won't end. @.@

Sprite 32 isn't needed for a level to work. His level has one sprite and three objects, so I don't see why that would be the problem. I suspected the background/tileset could be at fault (it happened to me once with a bonus room - now that I think of it, it was 1-1 area 3 as well) so I tried changing it, but that didn't help..
Ehm
Member
Level: 46


Posts: 57/532
EXP: 677934
For next: 33840

Since: 06-13-09
From: Canada

Since last post: 145 days
Last activity: 103 days

Posted on 07-08-09 12:22:54 PM Link | Quote
make sure the entrance linking is correct in the settings? That's a common crash :/
Hiccup
Member
Disgustingly Naive Smartass
Level: 53


Posts: 66/728
EXP: 1089714
For next: 67405

Since: 05-19-09


Since last post: 4 days
Last activity: 1 hour

Posted on 07-08-09 12:31:35 PM Link | Quote
Hmm


-----
also treeki what is "camera x" and "camera y" and what is the "view" setting? (in the entrance settings)
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 399/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-08-09 12:33:52 PM Link | Quote
Originally posted by Hiccup
Hmm


-----
also treeki what is "camera x" and "camera y" and what is the "view" setting? (in the entrance settings)

Camera X/Y lets you position the camera at a specific place when coming out of an entrance. View is used for areas that have multiple views (Block 8 stuff - see 7-1 for an example; click View Minimap, it has several areas in the same level file)
Garmichael
Member
Level: 24


Posts: 17/121
EXP: 73412
For next: 4713

Since: 06-24-09
From: Seattle, Wa

Since last post: 6.0 years
Last activity: 6.0 years

Posted on 07-08-09 06:25:58 PM Link | Quote
Originally posted by Treeki
You know.. the reversed thing seems like it uses signed numbers. It would make sense seeing everything you've mentioned, including the reordering and such.

With signed numbers, negative numbers start off from FF FF FF FF.

Example:

2 = 02 00 00 00
1 = 01 00 00 00
0 = 00 00 00 00
-1 = FF FF FF FF
-2 = FE FF FF FF
-3 = FD FF FF FF
and so on

This defines it: http://en.wikipedia.org/wiki/Two's_complement
Basically, 80 00 00 00 is the lowest (equal to -2147483648 I believe) and 7F FF FF FF is the highest (equal to 2147483647). I hope this makes them a lot clearer.


Thanks for this info Treeki (and Messiaen). It makes a lot more sense...
I've revised my theory to believe that this value is an offset in relation to the very center of the screen. Positive numbers measure the distance from the center to the point where the camera will start to pan up and down.

Negative numbers seem to reposition the camera in some way so that it starts our with mario closer to the top or bottom.



Originally posted by Hiccup
Treeki i made this level and when i played it it ---- i was on the map i go on to the level and it just jams at a black screen, i will post the level here:

http://www.mediafire.com/download.php?n5zutzzqfdg



Its something to do with your Block 1. The first problem is this bit:

0000 0000 2C01 1900 FFFF FFFF 2400 FFFF FFFF 0300 FFFF FFFF 0000 0000 0000 0000


Change that FF to 00.

Also, there is another problem in there somewhere because when it does open, the Interface graphics are all garbled up. I just copy and pasted the info from another level and it works fine.
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 400/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-08-09 06:31:44 PM (last edited by Treeki at 07-08-09 06:34 PM) Link | Quote
Originally posted by Garmichael
Its something to do with your Block 1. The first problem is this bit:

0000 0000 2C01 1900 FFFF FFFF 2400 FFFF FFFF 0300 FFFF FFFF 0000 0000 0000 0000


Change that FF to 00.

Also, there is another problem in there somewhere because when it does open, the Interface graphics are all garbled up. I just copy and pasted the info from another level and it works fine.

That's interesting. I didn't think levels could affect the interface graphics as well... I guess we're just going to keep finding out more about this game! I'll take a look at it and see what happens in a minute.

edit: For my reference, my current block 1 is 0006 8000 9000 0D00 FFFF FFFF 0B00 FFFF FFFF 3300 FFFF FFFF 0700 0700 0000 0000 - yes, I'm lazy.
Garmichael
Member
Level: 24


Posts: 18/121
EXP: 73412
For next: 4713

Since: 06-24-09
From: Seattle, Wa

Since last post: 6.0 years
Last activity: 6.0 years

Posted on 07-08-09 09:08:34 PM Link | Quote
I found where the Interface graphics were being garbled up.

Its in his Block 5

0000 03FF 03FF FFFF FFFF FFFF FFFF 0000 0000 0000



The problem is the Red set of FF. I set it to 00 and the Interface is back to normal. The Blue set doesn't look like it should be FF either, but when I set it to 00 nothing apparent changes. I feel that its probably best to keep it 00 tho, since the only instances Ive found where it is FF is when the 2 bytes preceding it are also FF.



Also, Treeki, I have a couple more UI requests. In the data finder, can you set the font used to a fixed font like fixedsys? It'll make it easier to compare values. This isn't a huge deal since Ive just been copying the data to notepad.

The other request is for a Sprite list similar to the Entrances list. Again, not a big deal, but it'll help when verifying a sprite does or doesn't exist in the level (like when I accidentally put a sprite 0 in and forget to update it to real one).

I don't mean to tell you how to do things or add to your continuously mounting to-do list. I think you've done a fantastic job with this editor.
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 401/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-08-09 09:45:16 PM Link | Quote
Originally posted by Garmichael
I found where the Interface graphics were being garbled up.

Its in his Block 5

0000 03FF 03FF FFFF FFFF FFFF FFFF 0000 0000 0000



The problem is the Red set of FF. I set it to 00 and the Interface is back to normal. The Blue set doesn't look like it should be FF either, but when I set it to 00 nothing apparent changes. I feel that its probably best to keep it 00 tho, since the only instances Ive found where it is FF is when the 2 bytes preceding it are also FF.

Still can't figure out how to get this to occur.. Hiccup's level always crashes for me no matter what. Setting the red byte to FF in 1-1 makes the level crash too. What emulator are you using? I wonder if that might have something to do with it?

Originally posted by Garmichael
Also, Treeki, I have a couple more UI requests. In the data finder, can you set the font used to a fixed font like fixedsys? It'll make it easier to compare values. This isn't a huge deal since Ive just been copying the data to notepad.

Done. I've also implemented your two earlier requests - sprites and entrances are clonable using Ctrl, and backspace deletes objects (works for any type).

Originally posted by Garmichael
The other request is for a Sprite list similar to the Entrances list. Again, not a big deal, but it'll help when verifying a sprite does or doesn't exist in the level (like when I accidentally put a sprite 0 in and forget to update it to real one).

Working on this now. It won't work like the entrances list though - clicking an option in the Options menu will let you pop up a sprite list, similar to the data finder. (It won't update in real-time with your edits though; you'll have to click a Refresh button for that to happen.)
Garmichael
Member
Level: 24


Posts: 19/121
EXP: 73412
For next: 4713

Since: 06-24-09
From: Seattle, Wa

Since last post: 6.0 years
Last activity: 6.0 years

Posted on 07-08-09 11:48:11 PM Link | Quote
Originally posted by Treeki
Originally posted by Garmichael
I found where the Interface graphics were being garbled up.

Its in his Block 5

0000 03FF 03FF FFFF FFFF FFFF FFFF 0000 0000 0000



The problem is the Red set of FF. I set it to 00 and the Interface is back to normal. The Blue set doesn't look like it should be FF either, but when I set it to 00 nothing apparent changes. I feel that its probably best to keep it 00 tho, since the only instances Ive found where it is FF is when the 2 bytes preceding it are also FF.

Still can't figure out how to get this to occur.. Hiccup's level always crashes for me no matter what. Setting the red byte to FF in 1-1 makes the level crash too. What emulator are you using? I wonder if that might have something to do with it?



Im using No$GBA...
Did you change that byte in block 1 for his map?
I uploaded the version of his map that I'm using to get the error to occur, so you can test that one. This level will load properly for me and the interface graphics are jacked.
Link (right click to download):
Hiccup's Garbledness

Originally posted by Treeki
Originally posted by Garmichael
Also, Treeki, I have a couple more UI requests. In the data finder, can you set the font used to a fixed font like fixedsys? It'll make it easier to compare values. This isn't a huge deal since Ive just been copying the data to notepad.

Done. I've also implemented your two earlier requests - sprites and entrances are clonable using Ctrl, and backspace deletes objects (works for any type).

Originally posted by Garmichael
The other request is for a Sprite list similar to the Entrances list. Again, not a big deal, but it'll help when verifying a sprite does or doesn't exist in the level (like when I accidentally put a sprite 0 in and forget to update it to real one).

Working on this now. It won't work like the entrances list though - clicking an option in the Options menu will let you pop up a sprite list, similar to the data finder. (It won't update in real-time with your edits though; you'll have to click a Refresh button for that to happen.)


Thanks for implementing all this stuff! Can't wait to try out your next version!
Hiccup
Member
Disgustingly Naive Smartass
Level: 53


Posts: 67/728
EXP: 1089714
For next: 67405

Since: 05-19-09


Since last post: 4 days
Last activity: 1 hour

Posted on 07-09-09 02:24:43 AM Link | Quote
I remember the touch screen being garbeled when i set the forground or background to 100

dont think its much to do with this though
Garmichael
Member
Level: 24


Posts: 20/121
EXP: 73412
For next: 4713

Since: 06-24-09
From: Seattle, Wa

Since last post: 6.0 years
Last activity: 6.0 years

Posted on 07-09-09 05:54:14 AM (last edited by Garmichael at 07-09-09 06:05 AM) Link | Quote
Sweet!
Figured out AA and BB empirically.

Check out this image I made:
Block 2 AA BB Described

As you can see, there are two red lines. The top line is the line mario must cross before the screen pans up, and the bottom line is the line mario must cross before the screen pans down. Keep in mind that Mario's reference point (the X/Y coordinate that determines mario's location) is at the soles of his feet and in the middle of his width.

The middle image, with AAxBB set to 00x00, shows the base lines for each.

When I went negative with the line, the line shifts upward by that amount. A positive number pushes that line downward by that amount.





I discovered something else pretty interesting....

This is tricky to explain, so I've supplied a screen shot to supplement:
Panning Block

Imagine the whole level broken up into squares of 256x256 pixels, measured from 0x0, not from the top left corner of your view.

Basically, if the game notices that there are no tiles in that block of 256x256, the camera will not pan into it from a horizontally or vertically adjacent block. In fact, the camera will pan specifically so that you can't even see into the block. If the empty block is to the left or right, it wont let Mario move into it and will act like a wall. If the block is above, Mario can move into it but the camera will not pan into it. If Mario falls into it, he will die instantly.

Notice that blocks A and F are empty. Mario cannot get to A from B, but he can actually jump from D to B. While he is in A, the camera will not move, but as soon as he crosses into B, the camera will jump to that location and that boundary would act like a wall. From there, As Mario approaches C, he will be able to see some of F, but as soon as he crosses into C, the camera will reposition so that the border to F is the bottom of the screen. If Mario jumps down into F, he dies (even though the block under F has ground).

If you're confused about this, try downloading my test level for it: Panning Block (right click and save as...)
Ninji

Boomboom
Why did my user title say I'm a toaster anyway
Level: 83


Posts: 402/1988
EXP: 5421367
For next: 10854

Since: 07-26-07
From: Rogueport

Since last post: 109 days
Last activity: 100 days

Posted on 07-09-09 08:18:55 AM Link | Quote
Originally posted by Garmichael
Im using No$GBA...
Did you change that byte in block 1 for his map?
I uploaded the version of his map that I'm using to get the error to occur, so you can test that one. This level will load properly for me and the interface graphics are jacked.
Link (right click to download):
Hiccup's Garbledness

Still can't get it to work... oh well. I wonder why it only crashes for me and not you, though.


The panning stuff is interesting, but kind of confusing. (I understand it - but designing levels with it in mind seems like it would be a pain, and it's not easy to figure out the 256x256 boundaries.)
Garmichael
Member
Level: 24


Posts: 21/121
EXP: 73412
For next: 4713

Since: 06-24-09
From: Seattle, Wa

Since last post: 6.0 years
Last activity: 6.0 years

Posted on 07-09-09 12:55:21 PM Link | Quote
The panning stuff would be easier to work with if there was an overlay grid in the editor. Tho, I could imagine it looking kind of cluttered. I've just been using a tile with a width and height of 16 and moving it around to figure out where the borders are.
I discovered this because in my level 1-1, when you climb up the vine to the second star coin, it would push the screen over. It wasn't exactly what I intended. Many hours later, I found out why.
Pages: 1 2 3 4 5 6 7 8 9 10 ... 22 23 24 25 26 27 28 29 30 31Next newer thread
Jul - NSMB Hacking (Archive) - Original NSMB Hacking Thread (Archived) New poll - New thread - New reply




Rusted Logic

Acmlmboard - commit 2f1bc75 [2017-08-27]
©2000-2017 Acmlm, Xkeeper, Inuyasha, et al.

30 database queries, 15 query cache hits.
Query execution time: 0.215091 seconds
Script execution time: 0.016993 seconds
Total render time: 0.232084 seconds