| |||
Views: 88,318,735 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 03-29-24 11:42 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 4 guests | 1 bot |
Main - ROM Hacking - Expanding a NES ROM? | New thread | New reply |
Jimmy52905 |
| ||
Paratroopa Level: 29 Posts: 151/152 EXP: 144044 Next: 3841 Since: 01-25-08 Last post: 5076 days Last view: 4132 days |
Well...figured I'd ask since I have no idea how to do this.
Basically, as the title says, I would like to know what exactly I have to do in order to expand a NES ROM. I am working on a hack of Mega Man 1, which is a ridiculous 128 KB in ROM size. With such limited size and freespace, it's pretty much impossible to do any heavy ASM hacking. Expanding the ROM would definitely help a lot. However, I have been told that expanding a NES ROM would be extremely difficult, and that it's more than just simply adding a bunch of 00s after the end of the data (much like expanding a SNES ROM.) Regardless of this, I would like to know what exactly I would have to do in order to achieve this. Would anyone here be willing to explain to me how I would go about doing this? ____________________ Come join my IRC channel, #Megahax for Mega Man hacking related discussions. |
Matrixz |
| ||
Ninji Level: 35 Posts: 90/225 EXP: 265777 Next: 14159 Since: 04-07-07 From: Norway Last post: 3078 days Last view: 1755 days |
There is PRG-ROM and CHR-ROM. CHR-ROM is always graphics but its not always used, in which case graphics are a part of PRG-ROM. Disregard all this, becouse Megaman 1 doesn't use CHR-ROM, which simplifies things.
Step 1: Modify NES header. The 5th byte in the ROM tells the number of PRG-ROM banks. (One bank is $4000 bytes). When adding more banks, i think it always needs to be twice as much as the old amount. Change it to 10 (hex). Step 2: Add the new pages. The last PRG-ROM bank needs to remain as the last one. (Its kind of the boot sector of the NES rom, so it must be at a fixed location). In MM1, it starts at 1C010. You will insert the new banks here. Insert $20000 bytes (with any value), the same amount of bytes the ROM originally was. Save. VoilĂ . (edit: corrected mistakes.) |
Kawa |
| ||
CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 138 Posts: 3649/5344 EXP: 30875930 Next: 787051 Since: 02-20-07 From: The Netherlands Last post: 4470 days Last view: 2605 days |
Posted by MatrixzConsidering MM1 doesn't use CHR-ROM, as you stated, don't you mean "the 4th byte in the ROM tells the number of PRG-ROM banks"? ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks — byuu |
Matrixz |
| ||
Ninji Level: 35 Posts: 91/225 EXP: 265777 Next: 14159 Since: 04-07-07 From: Norway Last post: 3078 days Last view: 1755 days |
Sorry, im not concentrated today Yes i meant PRG-ROM. Also its the 5th byte of the ROM (when counting from 1), not the 4th. I will add it to my testimony.. |
Jimmy52905 |
| ||
Paratroopa Level: 29 Posts: 152/152 EXP: 144044 Next: 3841 Since: 01-25-08 Last post: 5076 days Last view: 4132 days |
Well thanks for the info guys. However, there is a slight problem...I went to 0x1C010 in a hex editor to add the new banks, but...
1C010: 00 01 02 03 04 05 06 07 78 A9 01 8D 00 20 A9 06 I assume that in the bolded part is where I would write the values 08 - 0F for the new banks. But as you can see, instead of freespace in those last 8 bytes, there is code there. Adding those 8 bytes could be disastrous to the ROM. Is there some way around this or something? ____________________ Come join my IRC channel, #Megahax for Mega Man hacking related discussions. |
KP9000 |
| |||
Boomboom Level: 90 Posts: 1304/1975 EXP: 6937864 Next: 250745 Since: 02-19-07 Last post: 3552 days Last view: 3176 days |
|
JaSp |
| ||
Shyguy Level: 24 Posts: 76/95 EXP: 73124 Next: 5001 Since: 03-02-07 From: Paris, France Last post: 4322 days Last view: 4117 days |
Posted by Jimmy52905Actually, there should be code here. As the last PRG-ROM, it's where the first code executed when you boot the game is located; so since you want to add PRG-ROM banks, the last bank needs to be moved so that the game doesn't boot into your new expanded blank bank (since you probably won't need all the banks you add). The preceding bytes (00 to 07) are actually the end of the previous bank and seem to be some data of some sort and are irrelevant to your ROM expansion problem (not sure though,correct me if I'm wrong). I believe you can find some tutorials on Romhacking.net that might help you to better understand the process. Now, this is the first part to get the technical expansion, but then comes the usage of these new banks - meaning getting to know bank switching and all. I've only worked on MMC3 for Super Mario Bros 3 so I can't be of any help about MMC1. This document may help however (mapper 001.txt). |
Pikachumanson |
| ||
Newcomer Level: 7 Posts: 2/6 EXP: 934 Next: 514 Since: 03-04-13 Last post: 3945 days Last view: 3924 days |
Sorry to Necrothread, but i am also having the exact same problem with the reset routine. Except, the nes game is Outlanders. Anyone have any new info on this? Like is there a way to split the reset routine up so i can put my expanded bank there? I have thirteen bytes free from optimizing the controller routine. |
Main - ROM Hacking - Expanding a NES ROM? | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 67, rows: 95/95, time: 0.016 seconds. |