| |||
Views: 88,316,905 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 03-29-24 08:41 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 5 guests |
Main - ROM Hacking - 6502 ASM freespace, banks, and stuff | New thread | Thread closed |
BigJohnBoy |
| ||
Newcomer Level: 4 Posts: 1/2 EXP: 203 Next: 76 Since: 01-29-10 Last post: 5173 days Last view: 5173 days |
Well, I'm getting around to trying an ASM hack for SMB3 NES. I have a small code which will change the music. (I'm using JaSp's music tool) The hijack will need to take place at 0x0007C8F7(PC). And all I need is to insert a JSR there. The problem is I have no idea which banks are which and all that. The major question here is what do I need to do to calculate the offset to JSL to? (Or I may not be using the right freespace areas, I really don't know)
The simple code I wanted to put into freespace: LDA #$22 STA $04F5 RTS |
kuja killer |
| ||
Level: 55 Posts: 152/628 EXP: 1241079 Next: 73110 Since: 03-20-07 From: Lake Havasu City, Arizona Last post: 254 days Last view: 11 hours |
7C8F7 ?? that cant be possible because the super mario 3 ROM is only 40,000 bytes of code, not 80,000.
Unless you mean 3C87F .. which is the last bank in the entire rom which is usually always swapped in at all times, so if you put your little piece of code within 3C000 - 3FFFF ..then you dont ever have to bankswap. Do a 20 F7 C8 (JSR C8F7) .and insert your code being A9 22 8D F5 04 60 |
BigJohnBoy |
| ||
Newcomer Level: 4 Posts: 2/2 EXP: 203 Next: 76 Since: 01-29-10 Last post: 5173 days Last view: 5173 days |
Eh, somewhere along the music inserting process the rom became expanded 640kb. And, I also screwed, the offset (which is surronded mostly by 0's) is 422FE according to Hex Workshop. Also I've heard that there has to be some kind of converting to get the PC address to CPU or something, does that even apply here? |
DahrkDaiz |
| ||
Nipper Plant Sandwich Artist Level: 46 Posts: 360/417 EXP: 672942 Next: 38832 Since: 02-22-07 Last post: 3458 days Last view: 3378 days |
Jasp's music inserter expands the rom by $40000 bytes.
Have you ever used FCEUxd (or any variation of FCEU with the debugger)? If not, download it and play around a bit. The way I insert assembly hacks is I use the debugger to find where I want to insert it. I set a breakpoint where the code is going to branch, then in the ASM disassembly that's shown on the left side of the debugger, it shows the address of each line of code, so I know where to make my JSR/JMP's to. |
Main - ROM Hacking - 6502 ASM freespace, banks, and stuff | New thread | Thread closed |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 47, rows: 70/71, time: 0.014 seconds. |