Points of Required Attention™
Smaghetti, a new Super Mario Advance 4 editor, is currently in development! Check out the thread HERE!

Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,314,759
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 03-29-24 01:22 AM
Guest: Register | Login

0 users currently in ROM Hacking | 5 guests | 1 bot

Main - ROM Hacking - The Zelda 2 expansion thread again New thread | New reply


Dwedit
Posted on 08-04-07 08:47 AM (rev. 3 of 08-04-07 09:26 AM) Link | Quote | ID: 59919


Red Paratroopa
Level: 30

Posts: 100/162
EXP: 162771
Next: 3098

Since: 03-07-07
From: Chicago

Last post: 3490 days
Last view: 1585 days
First, the text file describing how to expand the rom:

First, you need to physically expand the rom.
Duplicate the first 128k after the NES header, then change the header to indicate that the PRG size is now $10 instead of $08.

Then make these changes to allow the game to use the expansion:


Paste this code into FF64 (3FF74)
A9 00 LDA #$00
8D FE 7F STA $7FFE
8D FF 7F STA $7FFF
4C 70 FF JMP $FF70

Modify reset vector at FFFC (4000C)
replace this:
70 FF
with this:
64 FF


Paste this code into FF4C (3FF5C)
4A LSR
4A LSR
48 PHA
29 08 AND #$08
8D FE 7F STA $7FFE
68 PLA
29 07 AND #$07
60 RTS

Go to CBA6 (3CBB6)
Replce this:
4A LSR
4A LSR
29 07 AND #$07
With this:
20 4C FF JSR $FF4C
EA NOP

Paste this code into FF58 (3FF68)
8D 69 07 STA $0769
48 PHA
AD FE 7F LDA $7FFE
8D FF 7F STA $7FFF
68 PLA
60 RTS

Go to CD59 (3CD69)
Replace this:
8D 69 07 STA $0769
with this:
20 58 FF JSR $FF58

Replace the bankswitching code at FFC5 (3FFD5) with this:
A9 00 LDA #$00
F0 06 BEQ $FFCF
AD 69 07 LDA $0769
0D FF 7F ORA $7FFF
8D 00 E0 STA $E000
4A LSR
8D 00 E0 STA $E000
4A LSR
8D 00 E0 STA $E000
4A LSR
8D 00 E0 STA $E000
4A LSR
8D 00 E0 STA $E000
60 RTS


And the obligatory "Example of how to use the expansion" post:



Okay, here's an ASM hack that allows you to expand Zelda 2.
Read the text file, zelda2_expand.txt.

Also read the overworld locations table format text file, zelda2_overwold.txt, so you know what the hell I mean when I say "W" byte.

The ASM hack allows you to specify that an exit to an overworld/town/palace is on the second 128k.
You do that by setting bit $20 of the "W" byte.
LIMITATIONS:
When you leave a palace or town located on the second 128k, you will go back to an overworld on the second 128k, even if the teleporter that took you there was on the first 128k.
You also need to specify the $20 bit for ALL towns and palaces you want to place on the second 128k, otherwise they will switch back to the first 128k.
When you continue or restore from a save, you start on that half of the rom.

Example!


An example of using the expanded rom:
First expand the rom and apply the asm hacks
Then copy 4000 bytes at 8010 [file address] to 24010.

Let's change that forest with the 50 point P bag to another overworld.

Hack these bytes:
4631: AA
46AF: 00
46EE: 20

After doing all the hacking, that forest now takes you to a messed-up version of the second overworld (because we copied that rom bank from 8010 to 24010).

Possible hack ideas: (use your imagination!)
Double the width of the overworld maps by having caves link the two halves together.
Make huge palaces, now that you have twice as much room as before.
Have a light world/dark world. Note that palaces share RAM areas to store their state, so you could put the key in one world, and the locked door in the other.
Have a Palace that you enter in such a way that is hard to exit from, then when you clear it, you emerge on the second world.





____________________

Ice Penguin
Posted on 08-04-07 07:42 PM Link | Quote | ID: 59945


Popo
Level: 51

Posts: 334/539
EXP: 988999
Next: 24939

Since: 02-20-07
From: Kasuto

Last post: 4760 days
Last view: 4760 days
Awesome, thanks.

Trax
Posted on 08-05-07 12:16 AM Link | Quote | ID: 59964


Yellow Stalfos
Level: 71

Posts: 105/1145
EXP: 3028777
Next: 138337

Since: 07-06-07
From: Québec

Last post: 3598 days
Last view: 2850 days
Alright, I got it to work at last...
If you copy the 128k after the original one, you get an exact copy of the other world...
I like the idea of using the expansion for a Dark World...

The fact that collectable objects are shared is a good thing, but it would be even better if we could find a way to double the amount as well. But this means we need to find unoccupied space to store the data in RAM and also a way to store the data in the saved game file...

Dwedit
Posted on 08-05-07 10:11 AM Link | Quote | ID: 59997


Red Paratroopa
Level: 30

Posts: 101/162
EXP: 162771
Next: 3098

Since: 03-07-07
From: Chicago

Last post: 3490 days
Last view: 1585 days
If you want to map out the SRAM, I'd say write DEADBEEF repeatedly across the SRAM area, then create 3 new saves, then play through the game. Whatever stays as DEADBEEF is probably free SRAM.

____________________

Main - ROM Hacking - The Zelda 2 expansion thread again New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (350KB of memory used)
MySQL - queries: 52, rows: 76/76, time: 0.015 seconds.