Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - help w/ sprite placement for SMB2 | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Ice Ranger

Leever
Level: 23

Posts: 162/183
EXP: 60462
For next: 7261

Since: 03-16-04

Since last post: 82 days
Last activity: 3 days
Posted on 07-04-05 10:14 PM Link | Quote
I decided to hack that part with a hex editor since this is where Acmlm's editor seems to be buggy.

Here's the address I'm looking at: 0x01764

03 85 01 01 01 03

The first byte there is the sprite ID, the second is the X and Y position of the sprite on the page. I'm unsure about the rest though. I'm wanting to know how the page the sprite appears on changes. Seems to be the hard part with changing the level data as well.

I have the locations of the pointer as well for that area described above, it's 0x012570 with the following hex:

16 53

Oh, and all this is for the upper area of the cave of 1-1.

I decided I better start looking into changing the levels of my hack pretty soon. Maybe I'll learn a lot about pointers by posting this as well (I know a little, but not a lot).
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 959/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 07-06-05 12:56 PM Link | Quote
It's been a while, but I'm 100% sure this is how enemy data works.

Let's take the very first level, the vertical part of 1-1, which starts at $12708:

01 01 05 03 76 03 6C 01 01

Enemy data is stored in blocks, one for each page. The first byte defines the size of the block, including the size byte itself. A value of 01 indicates that no enemies are to be drawn for that page, so the first two 01s in the example skip two pages. The next block, starting with 05, contains two Shyguys (sprite ID 03) with screen locations of X:07/Y:06 and X:06/Y:0C. The last two 01s cover the last page of the level and the page past that (so enemies from the next area aren't inadvertently loaded). The next vertical area starts immediately after, at $12711. That's all there is to it!

Also, you're not calculating your pointers correctly, but that's totally understandable...they're a little weird. I had to figure them out all over again while writing this post. The first pointer table, starting at $12510, points to the pointer table for each full level's (1-1, 1-2, 1-3, etc.) enemy data. It starts with 21 high bytes, followed by 21 low bytes (7 worlds * 3 levels = 21 pointers--yes, world 7 technically has 3 levels!). The first pointer is A5 54, which points to $12564. This is the start of the pointer table for 1-1: 10 high bytes, 10 low bytes (each level holds 10 areas). The first pointer here is A6 F8, which points to $12708--the first area, as detailed above.

That oughta cover everything. I hope I wasn't too confusing...


(edited by BMF54123 on 07-06-05 03:58 AM)
Ice Ranger

Leever
Level: 23

Posts: 165/183
EXP: 60462
For next: 7261

Since: 03-16-04

Since last post: 82 days
Last activity: 3 days
Posted on 07-06-05 08:20 PM Link | Quote
01 01 05 03 76 03 6C 01 01 05 14 56 14 AD 03 03 9D 07 0E 83 0E 79 03 BC 05 0E 90 02 75

Eh, the first 9 bytes is what you gave. Here's what's left:

05 14 56 14 AD 03 03 9D 07 0E 83 0E 79 03 BC 05 0E 90 02 75

The 05 is something I'm not sure what it is yet. Seems to be something along the lines of telling to stop the last function of drawing empty screens and switch to drawing sprites or the other way around.

It was simple to find that the 14 is the Hoopstar appearing at the X=5, Y=6 and the other at X=A and Y=D on the first page. The 03 that is before the other 03 is confusing as well because changing that does unexpected things. The 03 after it changes the next Shy Guy below the Hoopstars with the X=9 and Y=D on the next page.

Imediately after the 9D is another byte that screws stuff up if changed. I think it's used to switch pages as well.

I guess that's what I'm trying to figure out, mainly. I plan on wiping out everything and starting from scratch so I can actually go all the way to area 7-3.

BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 962/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 07-07-05 02:42 AM Link | Quote
Yeah, that's the size byte for the current block. If you split that string up into its individual blocks (remember, one block per page), it becomes easier to understand:

1-1, first vertical area - 4 pages + 1 buffer page
01
01
05 03 76 03 6C
01
01
1-1, second vertical area - 4 pages + 1 buffer page
05 14 56 14 AD
03 03 9D
07 0E 83 0E 79 03 BC
05 0E 90 02 75 (where'd that 02 come from? it should be 0E)
01 (don't forget the extra "buffer" page)

Really, that's all there is to sprite data. There aren't any other "special bytes" that I'm aware of...just block sizes and the enemies themselves.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - help w/ sprite placement for SMB2 | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.017 seconds.