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 - Working Locks in SMB3: How to | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
beneficii

Lakitu
Level: 36

Posts: 115/567
EXP: 299656
For next: 8454

Since: 06-27-04
From: Cordova, TN, USA

Since last post: 14 hours
Last activity: 6 hours
Posted on 06-09-05 10:37 PM Link | Quote
EDIT: Looking back over this, I see it was poorly written. Let me edit it a bit.

EDIT 2: It's not confirmed yet, but it looks like there is a fixed number of locks per world:

World
1--1 lock
2--1
3--2
4--2
5--2
6--3
7--2
8--4

Because of this, don't go over the number of locks for each world.
------

Okay guys. I'll come out and say it. If you want to change a lock's position in the game SMB3 for the NES and have its being cleared stick, here's what you do. Note that, unless otherwise mentioned, all numbers mentioned are in hexadecimal.

First, note that lock type A is for vertical roads, and lock type B is for horizontal roads.

Second, here are the addresses of particular tables in the ROM. There are 10 different lock positions in the game (so there are 10 chunks per table). The first lock is broken when you finish the first fortress (wherever that may be), the second the second fortress and on the same map and (presumably) same screen as the fortress you finish, so you may want to make sure players can only complete fortresses in the order you want. I think it would be instructive to find out how the game deals with a warp whistle, because fortresses and locks are skipped when you use it, so I wonder how the game skips over them, if there is a fixed number of locks per world (which would be a problem) or if the game simply counts the number of fortresses, etc., actually present in each world it skips (which would simplify things).

Third, I have not experimented with breaking a lock on a different screen. I'm going to do that next. Also, a vertical river (like those in Worlds 4 and 5) can be used instead of a lock. I believe other types of tiles may be used. I sorta know where to find them out. Since I gotta leave in about 10 minutes, I'll check that out later. Basically, you use clearable tiles, tiles that change after you "clear" them. Here are the starting addreses in the ROM for each of the tables:

147CD, each chunk lasts 1 byte and represents the high byte of the address to the name table where you'll draw the graphics that replace the lock: By the way the world map is drawn, the value here must be either 28, 29, or 2A. Anything else'll just not work. To find the exact value of both bytes of where to put in the name table, open up the Discombobulator or Workshop, get the x and y values of where you want to draw to replace the lock, and use the result from this formula:

A = 2880 + 40 * y + 2 * x

The A value is what you want to use.

147DE, 1 byte each, represents the low byte for the address to the name table, gotten from the formula above. Put the low (less significant) byte in.

147EF, 2 bytes each, setting the "cleared" tiles. This is the one that everyone missed. This maintains the lock has "cleared" (i.e. replaced with a road), "cleared" like a level is cleared, after you enter another level. Each chunk has 2 bytes. The first byte of a chunk is as follows:

ssss xxxx
s=screen number
x=x position

The second byte depends on your y value. Depending on your y value in Discombobulator or Workshop, here's what you put for the second byte:

y=
0--you put 80
1--40
2--20
3--10
4--08
5--04
6--02
7 or 8--01

And that's it.

14811, 4 bytes each, 8x8 tiles to put to name table. The first byte is upper left, next upper right, next lower left, and last lower right. There is a variety of values, but here are some preset ones you'll find useful:

FEC0FEC0 vertical road
FEFEE1E1 horizontal road
D4D6D5D7 horizontal bridge

14855, 1 byte each, y position to put explosion and same passability as new tile. The byte works like this:

yyyy 0000
y = y position in Discombobulator or Workshop + 2

14866, 1 byte each, x position'. The byte works like this:

xxxx ssss
x = x position of lock
s = screen number of where the lock is

14877, 1 byte each, tile number to imitate passability of after clearing the lock. There are some different ones you can use, along with the lock tile that when cleared switches to them:

45--horizontal road, used with tile 54 (lock A)
46--vertical road, used with tile 56 (lock B)
B3--horizontal bridge, used with tile 9D (vertical river)
DA--horizontal road, second palette, used with tile E4 (lock B, second palette)

And that's it! I believe this works with every lock in the game (I've checked most of the chunks in the table--including the ones in World 8--and they match up!). Check it out for yourself! Oh, and editor makers, implement this!

Remember, when a locked is cleared, there is a set tile that the lock (depending on its type) reverts to. Lock A always reverts to vertical road, lock B to horizontal road, The vertical river to horizontal bridge, etc.



Now on to setting airship retreat positions and to finding out exactly how to work pipes!


(edited by beneficii on 06-10-05 04:14 AM)
(edited by beneficii on 06-11-05 12:34 AM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Working Locks in SMB3: How to | |


ABII


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



Page rendered in 0.013 seconds.