PDA

View Full Version : [Tutorial] How to enlarge ROMs


ribon22x
September 16th, 2009, 7:42 PM
Hello, I'm Ribon22x, a spanish-speaking ROMHacker. I come here to post my first manual on pokecommunity, I've done quite a few already in my language, but this one is the first one I put in here. Hope you like it!

Well, my fellow Romhackers, here I bring you a manual that I've been working on this afternoon for you all, in which I explain how to get more space on a ROM, you might say "More space? This guy is nuts!".

And yes! I am nuts XD. Honestly this manual is still on a debugging stage, that means that there is more investigation to go though to see if it keep working in other situations, and I'll be posting any changes on this same topic. Meanwhile I'd like for you to post your questions or feedback any way this tutorial could get better.


I hope you enjoy them and post your comments.

UPDATES:
- Confirmed, inserting images (using UNLZ, for example) to the new offsets is possible.
- So far only tested on ruby, but I don't think there will be any problems with other bases.

Cheers!

Here I give you the downloading links in 2 different formats

Neo-Wolf
September 20th, 2009, 4:47 AM
You mean expanding the ROM to 32 MB?

ribon22x
September 20th, 2009, 6:45 AM
The truth does not necessarily you must expand it to 32 MB, you can expand what you need and then you can re-expand it if you want.

The maximum amount that you can expand it until you reach the 32 MB ROM, but I do not recommend it, but you can expand it enough to have your space to do what you want.

NatureKeeper
September 27th, 2009, 11:29 AM
WOW. This tutorial rules. Now I can go crazy scriptin' :P

hi sir tomato my password is syvniti
September 27th, 2009, 11:39 AM
WOW. This tutorial rules. Now I can go crazy scriptin' :P
You could before, the thing which need to be expanded isn't the rom, it's the hackers idea of the rom's amount of space.

.Seth
September 27th, 2009, 11:39 AM
Or you could just use XSE's built in expander. :/

SharpPoint
September 27th, 2009, 2:36 PM
You could before, the thing which need to be expanded isn't the rom, it's the hackers idea of the rom's amount of space.

I don't see the need for this tutorial. It's not like they're create a hack so awesome, it needs more space.

●•ΛΣЯӨЩ•●
September 27th, 2009, 4:46 PM
Well XSE also has a Rom expander and compressor if i'm not mistaken...

ribon22x
September 27th, 2009, 4:48 PM
Or you could just use XSE's built in expander. :/
But XSE expands to 32 MB, and I personally would not recommend expanding to 32 MB, but is only a matter of emulation.

Maybe that was what they were talking so badly of expander XSE ROMs

Darthatron
September 27th, 2009, 9:32 PM
You can expand it to 32 MB then, after you've finished with editing it, make it smaller. :\

NatureKeeper
September 28th, 2009, 12:48 AM
You could before, the thing which need to be expanded isn't the rom, it's the hackers idea of the rom's amount of space.

I have a really, I mean the word really long script. No free space in the game seemed to do. It was over 200 raws!

I knew I could expand in XSE, but Advance Map doesn't take more than 6 characters!

The call idea is what made me happy. Now I can script without worries.

Micael Alighieri
September 28th, 2009, 8:22 AM
Good tutorial. I prefer to use the original bytes of my rom but it's a good tutorial.

score_under
September 28th, 2009, 10:27 AM
Well XSE also has a Rom expander and compressor if i'm not mistaken...
Expander and truncator. If it compressed the ROM, it would render it unplayable (unless by some amazing miracle)


In my opinion, you don't need any more space in your ROM. If you somehow manage to waste the whole 9MB of free space, you have probably tried too hard. One average script is 100-200 bytes. This means you could insert between 47000 and 94000 scripts of these sizes without running out of space.

One 64x64 16 colour image is 2KB, meaning you could fit 4608 of them in the free space. Maps are smaller than this.

I have a really, I mean the word really long script. No free space in the game seemed to do. It was over 200 raws!
"#raw" commands are not really meant to be used. If you're using them, you should look up the named equivalent instead (try decompiling again after compiling).

EDIT - Also, with a 200-#raw sized script, you could still fit over 47000 of them on your ROM without expanding.

People need a better sense of scale.

hi sir tomato my password is syvniti
September 28th, 2009, 10:42 AM
I have a really, I mean the word really long script. No free space in the game seemed to do. It was over 200 raws!

I knew I could expand in XSE, but Advance Map doesn't take more than 6 characters!

The call idea is what made me happy. Now I can script without worries.

This even prove my point more.

It's you who need to be expanded, not the rom.

score_under
September 28th, 2009, 12:00 PM
It's you who need to be expanded, not the rom.
If you're referring to his knowledge of relative file sizes, then I think you made sense for once... o_O

addictz10
February 7th, 2016, 7:34 AM
Thanks for the guide

Bonnox
February 7th, 2016, 3:04 PM
The truth does not necessarily you must expand it to 32 MB, you can expand what you need and then you can re-expand it if you want.

The maximum amount that you can expand it until you reach the 32 MB ROM, but I do not recommend it, but you can expand it enough to have your space to do what you want.

may I ask you why you don't recommend to expand up to 32 MB?
The VBA accepts any size of ROM without crashing, by may be that the hardware only works with a power of 2 as the size? I dont't recall, but if it was true, it is certainly signed down in gbatek or tonc. Also remember that XSE itself only allows 8, 16 and 32 MB; there may be a reason.



You could before, the thing which need to be expanded isn't the rom, it's the hackers idea of the rom's amount of space.

you are so right man! here in IT (don't know other countries) there is a lot of disinformation about free space. they still insist on using FSF and other fluffy tools while a simple hex editor could do all these kind of jobs!!

But the thing that I hate the most is the "put #dynamic 0xExcessivelyHugeNumber in scripts otherwise the ROM will crash!!!!111XD" My poor eyes. Misinformation protracted since 2003 (or something), thats a record.
I began to put 0x700000 on ruby to save A LOT of space. And maybe will now revert to 0x6something to use up to the littlest tiny crumb of space :)

Deokishisu
February 7th, 2016, 3:55 PM
may I ask you why you don't recommend to expand up to 32 MB?
The VBA accepts any size of ROM without crashing, by may be that the hardware only works with a power of 2 as the size? I dont't recall, but if it was true, it is certainly signed down in gbatek or tonc. Also remember that XSE itself only allows only 8, 16 and 32 MB; there may be a reason.

My flashcart can play any sized ROM on real hardware up to 32MB. There seems to be quite a large variation in the actual size of ROMs. Atari Anniversary Advance is 4.096MB, Avatar the Last Airbender is 8.192MB, Pokemon Mystery Dungeon Red Rescue Team is 32.768MB, I've got two Goomba Emulators packed with different GBC ROMs that clock in at 17.393MB and 13.169MB respectively. However, within my small sample of GBA ROMs, it seems that Nintendo only released them as ~4MB, ~8MB, ~16MB, and ~32MB, so whether a ROM at some weird size, like 13MB or something, would work if put in a real, non-flashcart cartridge is anyone's guess. Does anyone know of a released GBA game that's not in those four sizes?

Bonnox
February 7th, 2016, 4:08 PM
My flashcart can play any sized ROM on real hardware up to 32MB. There seems to be quite a large variation in the actual size of ROMs. Atari Anniversary Advance is 4.096MB, Avatar the Last Airbender is 8.192MB, Pokemon Mystery Dungeon Red Rescue Team is 32.768MB, I've got two Goomba Emulators packed with different GBC ROMs that clock in at 17.393MB and 13.169MB respectively. However, within my small sample of GBA ROMs, it seems that Nintendo only released them as ~4MB, ~8MB, ~16MB, and ~32MB, so whether a ROM at some weird size, like 13MB or something, would work if put in a real, non-flashcart cartridge is anyone's guess. Does anyone know of a released GBA game that's not in those four sizes?

yeah, you've got a point: hardware actual size. so the two games of yours that fall out of the scheme are not published by nintendo?
although I notice that the samsung S4 mini has 1,5 GB of RAM, wich is clearly not a power of 2, but that's another story: maybe harware making processes have developed to allow such quantities. (or perhaps it uses 2 banks, thing that is quite odd)
edit
ah,no, look: any single pendrive on earth is sized in power of two. so is definitely a matter of hardware making. but it is still a mistery of why you have such unaligned ROMs.

Deokishisu
February 7th, 2016, 11:09 PM
yeah, you've got a point: hardware actual size. so the two games of yours that fall out of the scheme are not published by nintendo?
although I notice that the samsung S4 mini has 1,5 GB of RAM, wich is clearly not a power of 2, but that's another story: maybe harware making processes have developed to allow such quantities. (or perhaps it uses 2 banks, thing that is quite odd)
edit
ah,no, look: any single pendrive on earth is sized in power of two. so is definitely a matter of hardware making. but it is still a mistery of why you have such unaligned ROMs.

The unaligned ones (the 17MB and 13MB ones) are both a ROM containing a GBC emulator called Goomba as well as several GBC ROMs packed into one file. They're not official Nintendo things, and I could presumably pack in anywhere between Goomba's minimum filesize up to 32MB worth of space. The others I mentioned are officially released games.