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 - Slight change for Zelda 3 chests | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 2105/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-06-05 01:50 PM Link | Quote
If it ever annoyed you that Zelda 3 chests can only be opened from the front (which sort of makes sense, but regardless) there is a simple two byte change you can do to eliminate this. Go to offset $3B576 and change that byte and the following one to EA EA. The instruction before this looks at $2F (Link's direction) and the instruction you're NOPing out branches if it's not up ( 0 = up, and it's using BNE). The other directions are down = 2, left = 4, right = 6.

So there you have it, Chrono Trigger/ Final Fantasy style chests using only two bytes.
NEONswift

Rope
Level: 19

Posts: 98/117
EXP: 30883
For next: 4894

Since: 03-17-04
From: England

Since last post: 24 days
Last activity: 1 day
Posted on 08-06-05 04:34 PM Link | Quote
Gotta love how something thats so simplistic can make such a difference. nice one MON.
SePH

Geldman
Level: 33

Posts: 381/459
EXP: 219339
For next: 9840

Since: 06-23-04
From: Québec
Caliss de libéraux

Since last post: 6 days
Last activity: 14 hours
Posted on 08-07-05 12:39 PM Link | Quote
Always wondered why that game acted that way rather then the FF way.

Just now, could make for some interesting dungeon designs.. and without much restrictions.

Awesome work again math. And thanks for sharing.
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 2107/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-07-05 01:24 PM Link | Quote
Thanks... this really is a minor edit and i can do a lot more than this. I'm looking at this point to expand the number of chests in the game. The 127 chest limit (am I correct on that?) is sort of irritating, and given that HM expands the rom it ought to have done something about that. It only edits the existing data arrays . Btw, there are a lot of special case routines for certain items, like the master sword. If anyone wants to use these without the frills let me know. I've also figured out how to determine the chest can have an alternate or not.It's all pretty simple.

In addition, I'm going to rerelease my RAM document which is much updated, especially the SRAM portion (it's actually accurate for a change!), which many of you will find useful. Look for a thread in the next week or so. If Euclid has any findings I'd love to publish those as well. I've already credited him for at least 3 entries in there. I had to google a cached version of the thread at the old old (Acmlm 1.8A) Tek where I last discussed the Ram Document


(edited by MathOnNapkins on 08-07-05 06:02 AM)
Euclid

Cheep-cheep
Level: 23

Posts: 187/193
EXP: 65528
For next: 2195

Since: 03-15-04
From: Australia

Since last post: 24 days
Last activity: 7 days
Posted on 08-07-05 03:32 PM Link | Quote
I have a few more... (actually not so few afterall)

$8A - current overworld area number
$8C - current area overlay (there's a default value for no overlay)

(yes the following scroll registers are VERY EVIL!)
$E0 2 bytes - x scroll (min i think)
$E2 2 bytes - x scroll (max i think)
$E6 2 bytes - y scroll (min i think)
$E8 2 bytes - y scroll (max i think)

$11E 2 bytes - mirrored from $E2
$120 2 bytes - mirrored from $E0
$122 2 bytes - mirrored from $E8
$124 2 bytes - mirrored from $E6

With the following sound effect controls just write values below 0x40 for a sound effect, i found some which is not even used in game.
$12E - sound effect control
$12F - sound effect control #2

$202 - current item held in the y button box.

$371 (I THINK! it could be 370) - tells if link is running or not.

$0600 - $0607, $610 - $617 - scrolling edges (so screen will never scroll out of these values, it goes min x max x min y max y respectively and 2 bytes each), and yes, these are very annoying to change.
$700 - register to tell link where exactly he is scrolling-wise (like when you move up one screen it looks this number and subtracts 0x20 from it, usually it's 2*value in $8A)

$1CF0 2 bytes - message number which is loaded for dialogue

$1CF2 onwards is for [number1][number0] codes use i think.

SRAM wise (just subtract 7EF000 from addrs):

$7EF280, area number (relative) - these are area event codes, eg/ 0x20 is written at addr + $1B after zelda is rescued to trigger the door at hyrule castle being opened, use to "remember" what holes has been bombed open, what events (Eg/ fire rod burn open dark world dungeon 3, gargoyle grate open dark world dungoen 4 etc) has been done... lots of fancy stuff here, i've manage to move the make the tree stump in area 02 to appear in area 00 instead, a lot more research need to do be done to the code to know what each one does.

$7EF3C9/$7EF3CA - smithy triggers, i think 0x20 written means the smithy has been rescued, 0x30 means rescued and sword tempered.... (not confirmed do check it out first)

I probably have more but.... oh well that's all i can dig up in 10 minutes.

The 127 chest (or whatever) limit is there for a reason. I believe there isn't enough free space in the sram area to do more than 127 chests. (it has to know if the chest has been opened etc) I could be wrong about it though.
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 2108/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 08-07-05 05:03 PM Link | Quote
I'll take a look into those...

As far as I can tell, it seems each room can have up to 6 chests, b/c in memory tiles are assigned a value indicating what kind of tile they are. The first chest in a room will be represented by #$58 (actually #$58 will show up in four different locations, b/c the files I'm referring to are 8 pixel x 8 pixel tiles, not 16 X 16 blocks. The next chest will be #$59, then #$5A, up to #$5D. When each chest is opened it reverts to #$27 tiles, which is treated just like any other grabbable wall. In the code you'll even see something like LDA #$2727, STA $blah. That confused me at first till I looked at the memory layout in GSD.

Back to what I was saying. Anyways, it seems each of the 296 rooms is given a word of memory for "remembering" what has been done in it. Since there appears to be no correlation between the number 127 and 296, I can only presume that the 127 limit was done arbitrarily, and obviously they wouldn't have inserted extra space b/c space was precious in a 1MB snes game.

Edit: Note that the tile values do not influence the graphical representation, they are more like an underlying indicator of what that tile does.


(edited by MathOnNapkins on 08-07-05 08:05 AM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Slight change for Zelda 3 chests | |


ABII


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



Page rendered in 0.073 seconds.