(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-04-24 10:17 AM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - SMB2J: Pointer Sprites (Sprite E) New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
beneficii

Broom Hatter


 





Since: 11-18-05

Last post: 6288 days
Last view: 6284 days
Posted on 08-13-06 02:58 PM Link | Quote
Hmm, I'm reading through insectduel's poorly written (though once you can understand what he's saying informative) guide to hex offsets in SMB2J:

http://www.freewebs.com/insectduel/smb2jhexoffsetlist.htm

Now, I don't think many on here are familiar with SMB2J hacking, because you need to get the FDS file and the disksys.rom file for it, but I know at least DahrkDaiz has some familiarity with the game. Well, anyway, most sprites in the game have 2 bytes, formatted like this (by nybble):

XY OO

X = x position
Y = y position (< $e)
O = object nbr, with the leftmost bit flagging it, meaning to start a new page (screen) when that bit is set.

If, however, the y position is set to E, then the sprite becomes a 3-byte pointer sprite it seems, telling which level to load among other things when Mario enters a pipe. Now, I'm reading insectduel's description of it and he seems to understand it, but he doesn't explain it in an understandable way. That was fine: I did some experimentation and was able to find out what all the nybbles were used for excluding the first. Here is a description of them:

UE LL WP
U = not entirely sure. Insectduel says it "represents the horizontal area you currently placed," which are in very non-understandable terms. I can possibly see what he's talking about by horizontal, but it seems that the game is inconsistent with the use of this.*

E = must have the value E to tell the game that this sprite is a 3-byte pointer.

L = Level to load (by room header data). Leftmost bit is set if this sprite will start a new page (screen).

W = Current World (1, 5, etc.) - 1. Actually, this just occupies the 3 leftmost bits while P occupies the 5 rightmost bits, so they're not in perfect nybbles. Basically, this has to match the current world Mario is in, or this sprite won't be loaded, and the game will go down the list of available sprites to find the correct world. If it can't find the right world, then when Mario enters the pipe he will reenter the sublevel. In other words, this allows for access to the sublevel by multiple levels and does this check so Mario returns to the correct level.

P = Page (screen) Mario will enter new level. This occupies the 5 right bits, not just the right nybble, of the byte.

*Now, if this pointer sprite is in a normal level, it seems that this value doesn't matter. But, if in a sublevel, it seems to need to match it or be one off, or Mario will continuously reenter the pipe. For example, in World 1-1, I set this value of the pointer spirte to any value, but it still allows Mario into the pipe and Mario still enters at the correct area. If, however, in the sublevel that Mario goes to, I change that value (from 1), then if it's 0 or 2, Mario will still return to the correct world, but if it's anything else, then Mario will just simply reenter the sublevel from an invisisble pipe (which is always in the same position regardless of value). Perhaps someone here can answer the question of what exactly this value does?

EDIT: Oh, I understand now what that nybble was for: It indicates at which horizontal position that the level in the pointer sprite gets put as the level Mario goes to when he goes into a pipe. Mario goes to horizontal position of level acquisition, so it is set as where he will go when he enters a pipe, then he enters the pipe and he goes there.

If a moderator of this forum would please close the thread, thank you.


(edited by beneficii on 08-13-06 02:12 PM)
(edited by beneficii on 08-14-06 03:42 AM)
(edited by beneficii on 08-14-06 03:43 AM)
DJ Bouche

Koopa


 





Since: 11-22-05
From: Bligh Park, NSW, Australia

Last post: 6447 days
Last view: 6447 days
Posted on 08-14-06 01:03 PM Link | Quote
Just clearing up that this also applies to SMB, and be careful what levels you load on SMB2J FDS, the ones you want might not be in the current "disk side". World A-D have completely independent level numbers from 1-8 too. (If I remember correctly... it might be that all disk sides have their own level numbering, and reused levels/bonuses are merely copied) Needless to say, SMAS SMB2J merge all of the data together, though they've used some cheap little trick to allow more than 32 overworld levels in total (allowing A-D overworld levels to fit on the same single "bank").
beneficii

Broom Hatter


 





Since: 11-18-05

Last post: 6288 days
Last view: 6284 days
Posted on 08-14-06 01:44 PM Link | Quote
Originally posted by DJ Bouche
Just clearing up that this also applies to SMB, and be careful what levels you load on SMB2J FDS, the ones you want might not be in the current "disk side". World A-D have completely independent level numbers from 1-8 too. (If I remember correctly... it might be that all disk sides have their own level numbering, and reused levels/bonuses are merely copied) Needless to say, SMAS SMB2J merge all of the data together, though they've used some cheap little trick to allow more than 32 overworld levels in total (allowing A-D overworld levels to fit on the same single "bank").


Correct. When World A is loaded, the world count goes back to 0, and at certain points in the game different sectors of the disk get loaded: Worlds 1-4, Worlds 5-8, the Princess scene, World 9, and Worlds A-D. When you transition from World 4 to World 5, for example, the screen will stay black for longer than normal as it loads the next sector.
Deleted User
Banned


 





Since: 05-08-06

Last post: None
Last view: 6285 days
Posted on 08-14-06 03:13 PM Link | Quote
I don't think you have insectduel's permission to host the link unless you ask him first how poorly he describes.

Even though you did ask him, he won't answer you anymore.


(edited by Tecna on 08-15-06 01:58 PM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - SMB2J: Pointer Sprites (Sprite E) |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.014 seconds; used 366.77 kB (max 437.06 kB)