| |||
Views: 89,934,375 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 10-09-24 02:52 PM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 1 guest | 1 bot |
Main - ROM Hacking - nes programming? | New thread | New reply |
MartsINY |
| ||
Micro-Goomba Level: 11 Posts: 8/17 EXP: 4927 Next: 1058 Since: 03-31-11 Last post: 2239 days Last view: 2239 days |
hi!
I have a simple question : I'm now analyzing the whole code of MM4, ans then I'd like to create a new rom from scratch, in which I could write my function in assembly (like with FCEUX). I wondered if such a program exists? and if so, I'd like to know if there is one which allows me to give name to function, so when I create the code, it would place my functions in banks I set previously, but to adress not predetermined, so I would be able to expand my code again if I need to... thx!! |
ShaneM |
| ||
Snifit Compromised account. Please contact an admin to restore access. Level: 36 Posts: 119/285 EXP: 299958 Next: 8152 Since: 02-17-14 Last post: 3303 days Last view: 2819 days |
Posted by MartsINY First off, if I understand you correctly, you're asking how does one make a homebrew? It's either that or you're asking how to 'hack' a ROM image. Well, no. There are no tools that do specifically that (unless you count a disassembler which spits out raw code/data which would need to be labeled). What you would do is start a .asm file from a disassembly of MM4 then add/take away what you want in it. Then you'd use an assembler, such as ASM6 by loopy to assemble the file/files. Whether you are merely wanting to edit binary or the whole ROM is up to you. What I'd do is use a make.bat to assemble with (I personally add @pause and @echo). What you are looking for are called "labels". You can also accomplish your needs within a hex editor. I really feel you are asking how to hack rather than homebrew. What you'd do is a JMP (unconditional) or JSR or branch to the subroutine that you want to create. If you are using hex, make sure your absolute address reflects Program RAM and that the code is in the right bank within PRG (in case MM4 is not NROM, which I've never hacked MM games). Code looks something like this:
^The above code changes Goombas into Buzzy Beetles after accumulating 8 stars on the title screen. It's code I added to my Mario hack. Notice that I replaced my "ldy PrimaryHardMode" with "JSR newcode". (Assemblers don't read antyhing past a ";", which are considered comments.) Then I put my custom routine in. This is how it's done. Anywhere, period. Whether it is an .asm file or hex editor. (In a hex editor you use opcodes rather than mnemonics.) Make sure that you have room in the bank for your code as each PRG bank is $4000 bytes. Good luck. EDIT: You cannot add more bytes in than what was taken out within a hex editor or an UNLABELED disassembly. My LDY was to check if a flag bit was set at RAM address 076A (PrimaryHardMode). It was an absolute address = 3 bytes. My JSR took three bytes. If you ever do something like use branching (conditional statements; 2 bytes) then you'd NOP the third byte, if there was one. ____________________ At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day? |
MartsINY |
| ||
Micro-Goomba Level: 11 Posts: 9/17 EXP: 4927 Next: 1058 Since: 03-31-11 Last post: 2239 days Last view: 2239 days |
a big thx!! it was I was meaning, I always coded with FCEUX... dawn if I knew about it before!!
thx again |
Main - ROM Hacking - nes programming? | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 47, rows: 70/70, time: 0.061 seconds. |