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 - Can I expand my MM2 rom? Is it possible? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
infidelity

Red Paratroopa
Level: 21

Posts: 113/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 09-01-05 04:45 AM Link | Quote
I want to include extra graphics for sprites, and level design. I do not want to expand the rom for data, hex, etc. In my TLP, the screen goes all the way down to 3F000

Can I expand it to the point of a full blank page on TLP, to include custom graphics? And the ideas I've been comming up with are working, it's just that I need more room for all the other ideas I need. Thank You.
Dark Ludwig

Red Paratroopa
Level: 21

Posts: 74/172
EXP: 45740
For next: 4203

Since: 09-17-04
From: Georgia

Since last post: 9 days
Last activity: 2 days
Posted on 09-01-05 04:49 AM Link | Quote
No, I believe games have to be a certain filesize to even run properly. If you subtract the header and double the filesize, it would be the right size. But, you would have to change some bytes at the beginning of the rom, too, but I'm not sure which ones. I believe they tell the game what particular size the rom is, and that it can't just be any value. Laern ASM, then you may be able to figure it out.

And, since any rom goes for "Rom hacking", it would be nice if you said the name of the rom instead of an abbreviation. I have no clue what "MM2" is.
infidelity

Red Paratroopa
Level: 21

Posts: 114/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 09-01-05 04:53 AM Link | Quote
sorry, Megaman2


(edited by infidelity on 08-31-05 08:30 PM)
(edited by infidelity on 09-01-05 07:31 AM)
Dish

Spiny
Level: 38

Posts: 552/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 09-01-05 06:30 AM Link | Quote
Expanding CHR-ROM games isn't normally that difficult... just need to change the header and put new graphics at the end. Minor asm changes to get the proper banks swapped in (ie: to actually use your new graphics). It's the perfect project for someone just starting out or wanting to start out with assembly.

Unfortunately, Megaman 2 uses CHR-RAM, which makes things a lot harder, as the graphics exist intertwined with the code and swapping them out isn't as simple.
infidelity

Red Paratroopa
Level: 21

Posts: 115/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 09-01-05 06:57 AM Link | Quote
hmm, so it is possible? All i need is one blank page to view on TLP to do all the ideas I've got. I'm really excited over the things I've come up with. I'm not asking for spoon feeding, all I'm asking, is where for a complete noob, aka, me, to find the most simplest documents on how to do this, and also, one that give examples. I need examples, that's the only way I can learn. If it gives examples, I can do trial and error stuff, as long as I have a template. Please no flamming, no saying you never had your hand held, and all that high and mighty stuff. I'm just a die hard hacker, that's still fresh, and needs a little guidance. I'd appreciate any help anyone can give. Thank You. :-)
Dish

Spiny
Level: 38

Posts: 553/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 09-01-05 07:46 AM Link | Quote
Well it is possible... but adding more graphics to a CHR-RAM game isn't really a good beginner project. You might be better off starting a CHR-ROM game as a starter project to give you the idea. But just so I don't totally blow you off:

-- Since there's no CHR ROM, adding more graphics means either finding a large section of free PRG ROM space (there likely isn't a chunk big enough to hold the number of graphics you want), or adding more PRG ROM. I'm going to assume the latter.

-- PRG ROM usually must stay in a power-of-2 size, which means if you want to add more you'll have to double what's already there.

-- To make matters worse, Megaman 2 already uses the maximum PRG [normally] allowed by it's mapper (MMC1) -- 256k. To add more PRG you'll have to either change mappers, or employ the SUROM MMC1 board (which allows for 512k PRG -- this is the board Dragon Quest 4 uses). Believe it or not, changing the mapper would be simpler, as SUROM has funky swapping rules you'll probalby want to avoid.

-- All that aside, you have to get the game to swap in the tiles you want when you want. This may involve writing your own swap-in routine, as the existing one probably expects all of one type of graphic to be in the same area in the ROM (and you can't really squeeze more graphics in without shifting all sorts of code around -- you're better off just writing a new routine).

-- Swapping CHR-RAM is slow -- not like CHR ROM. You won't be able to have super fancy background animations like some games -- swapping takes way too much time.


With all these problems, this is the second-to-worst case scenario. The only thing I can imagine that could make it more complicated would be if the graphics were compressed.

But anyway, I don't want to be a total downer... I really want people to get into this stuff. Perhaps you might want to try a CHR-ROM game? MM3 and MM5 are CHR-ROM, but all the rest of the MM NES games appear to be CHR-RAM.

Expanding CHR-ROM is much, much, much simpler. MUCH simpler.


I've been thinking of writing a tutorial which sort of touches on the subject. Maybe I'll do that today/tomorrow -- I'm kind of bored with my current projects.


EDIT: Unfortunately I don't have a lot of docs which explain things... just technical reference docs =/ so that's why I can never point people in the direction of a good teaching reference.. I just don't know of any. Sorry about that


(edited by Disch on 08-31-05 10:47 PM)
Setzer

Popo
Level: 36

Posts: 436/532
EXP: 290182
For next: 17928

Since: 04-22-04
From: Not Florida. because I'm going to sink it.

Since last post: 5 hours
Last activity: 48 min.
Posted on 09-01-05 08:10 AM Link | Quote
Originally posted by infidelity
sorry, Megaman2

damn, everything involves asm.......forget it then. scratch that idea.


We just LOVE dedication
DukeNukem007

Shyguy
Level: 13

Posts: 69/90
EXP: 9247
For next: 1020

Since: 07-08-05
From: Quahog, RI

Since last post: 18 days
Last activity: 12 hours
Posted on 09-01-05 09:09 PM Link | Quote
Originally posted by Disch

-- Swapping CHR-RAM is slow -- not like CHR ROM. You won't be able to have super fancy background animations like some games -- swapping takes way too much time.


With all these problems, this is the second-to-worst case scenario. The only thing I can imagine that could make it more complicated would be if the graphics were compressed.



I don't know, Battletoads did some AMAZING things with 256k PRG/no CHR and mostly compressed graphics, i.e. loads of tile swapping and faux-multiple backgrounds--there is no way the NES should've been able to play it fluidly.

There is a decent amount of blank space in the MegaMan2 rom, but I agree that MM3/5 would be easier to hack (especially the latter...loads of free space in its 256k chr, except I think 256k chr is the maximum allowed size...MM3 is 256k PRG/128K CHR.)


(edited by DukeNukem007 on 09-01-05 12:14 PM)
Dish

Spiny
Level: 38

Posts: 554/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 09-01-05 09:18 PM Link | Quote
oh wow -- I knew the tricks Battletoads pulled off, but I just assumed it used CHR-ROM. That's pretty amazing that it doesn't. If memory serves, that game does really weird things to get extra speed though.

So maybe I should have been clearer. You won't be able to have super fancy background animations in Megaman 2, since I'm sure it's not build for speed in the same way Battletoads is.
DukeNukem007

Shyguy
Level: 13

Posts: 70/90
EXP: 9247
For next: 1020

Since: 07-08-05
From: Quahog, RI

Since last post: 18 days
Last activity: 12 hours
Posted on 09-01-05 10:25 PM Link | Quote
Originally posted by Disch
oh wow -- I knew the tricks Battletoads pulled off, but I just assumed it used CHR-ROM. That's pretty amazing that it doesn't. If memory serves, that game does really weird things to get extra speed though.

So maybe I should have been clearer. You won't be able to have super fancy background animations in Megaman 2, since I'm sure it's not build for speed in the same way Battletoads is.


Yeah, I haven't looked at the 6502 code but I'd guess that BT simply shifts words/bits/bytes over to get fake multiple-scrolling, which of couse the MM2 engine isn't programmed to. BT using CHR-ROM would actually be sort of inefficient because you have to store all 64 possible tile positions instead of shifting data manually...There are games like MM5 itself, and Bucky O'Hare (another nice game in terms of 'graphics gimmicks') that use fake multiple-scrolling, but those don't scroll diagonally so you'd only have to swap 4 or 8 tile slots.

Of course none of this multiple-background stuff should be confused with how tile backgrounds can shift horizontally at different rates, which almost any NES mapper can do.

In addition to the multiple-scrolling, swapping compressed sprites on the fly was ridiculous...there are a few PRG-only games that rapidly swap uncompressed tiles (MM6, DQ4) but nothing like that.
infidelity

Red Paratroopa
Level: 21

Posts: 116/164
EXP: 42804
For next: 7139

Since: 09-13-04
From: U.S.A.

Since last post: 2 days
Last activity: 6 hours
Posted on 09-02-05 01:32 AM Link | Quote
wow, lots of input. Johnny 5 likes! :-)

anyway, I'm not looking to do fancy backround graphics. if this can be done, my main objective, is to create multiple graphics for sprites. so far, I have 1 sprite that's normal in the game, and through the course of the game, you'll encounter that sprite, but it's in a different form, still doing the same task as the original. I started getting crazy ideas for the last part of the game, but I'm out of blank space, (unless theres garbage that I can get rid of) I got rid of all the Jap text, and replaced it with custom, ripped, sprtie graphics, told VISINE where to look. placed the sprite I want to use, and BAM! It worked!

so, if this can be done, I'm true to my word when saying I want to learn. I'm an out of the basket, complete noob, to rom expansion.

So, I don't want fance blinky sparkman, geminiman type graphics, I just want more space to insert silly looking sprite graphics. My idea works, I just need more space. This hack is about 80% complete. I appreciate all the replies, but now I ask, exactly, specificly, what do i need, what do i need to read, etc, etc. Thank You all for your replies. :-)


(edited by infidelity on 09-01-05 04:33 PM)
Dish

Spiny
Level: 38

Posts: 555/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 09-02-05 02:14 AM Link | Quote
Originally posted by infidelity
exactly, specificly, what do i need, what do i need to read, etc, etc. Thank You all for your replies. :-)


- FCEUXD (don't have a link offhand -- but you should already have a copy)

- Possibly NEStech. To work with the NES you must know how it works.

- This Tutorial on NES demo development may help (yes, you're not making a demo -- but programming is programming. -- When you know how to make a demo you know how to do anything you want on the NES). Although this demo isn't really geared towards people just starting out. I don't really have a better tutorial to recommend (considered writing my own, but blech).

- This 6502 Reference page is great and error free.

- Kevtris' mapper docs are pretty much the final word on mapper operations. Specifically, MMC1 (the mapper MM2 uses). You may also want to look into MMC3 since expanding will require a mapper change and MMC3 is the most reasonable candidate for the replacement mapper (unless of course you decide to go with the SUROM MMC1 board -- but it'd be easier to just change to MMC3)



Note that post expansion, the ROM will likely not work in Visene or any other editor -- and attempting to edit it in such an editor will more than likely destroy it.


The general work of what you need to do to expand PRG:

1) Change the mapper. MM2 has MMC1 is maxed out (SUROM aside), so you need to switch to MMC3. You'll have to find all the MMC1 register writes and replace them with code which performs the same function, but using MMC3 registers. The code likely only exists in two places: the reset vector (for mapper prep) and the PRG swap routine (which is called whenever the game bankswitches). Additionally, the MMC3 reset vector must point to the last 8k of PRG in the ROM ($E000-FFFF) -- it CANNOT rest within $C000-DFFF, so if MM2 has the reset vector pointing there, you'll have to move it to somewhere in $E000-$FFFF just so that you can swap the 2nd-to-last 8k to $C000-DFFF. This can be done with a mere 8 bytes -- find 8 free bytes in $E000-FFFF, and put in the following code:

LDA #$00
STA $8000
JMP xxxx ; where xxxx is the original reset vector

Change MM2's reset vector to point to that, rewrite those routines I mentioned, change the mapper number in the header, and you're in business.

2) PRG size must stay a power of 2. To expand you'll have to beef the PRG up to 512k -- even if you only want to add a few extra bytes.

3) The last 16k of PRG is "hardwired" to NES addressing space, so you must keep the last 16k as the last 16k -- even after expanding. In other words what is currently at $3C010-$4000F in the ROM must be moved to $7C010-$8000F after you've expanded.

4) Once you add the extra PRG, change the PRG page byte in the header to indicate you added more, and (if you did everything properly) you've got a functional, expanded ROM.

After that it gets tricky -- as things become game specific. I can't really tell you details because I haven't looked at MM2, but basically what you'll want to do is find the routine which writes new tiles to CHR-RAM (you can set breakpoints on writes to $0000-1FFF in PPU memory to isolate these routines) and see if you can change them so that they can take advantage of your new tiles. More than likely you'll have to write your own swap routine and call it when you want the tiles inserted (on map load seems like a safe time -- or whenever the game does it)


Like I said this is a big job -- I wasn't kidding ;P. But it is definatly possible.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Can I expand my MM2 rom? Is it possible? | |


ABII


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



Page rendered in 0.042 seconds.