Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-02-06 21:06:33

Miksy91
Member
Registered: 2010-10-16
Post 271/2,308

ROM resizing

I'd like to make my hack 4MB large and know that a byte in the rom header defines the size of the rom data and after modifying it, you can add more data to the rom manually by adding 00's to the end of the file.
I made a quick test to see if the game is able to load a script from offset 0x200B50 but unfortunately, it didn't work. The game only freezed.
The size of the rom was actually 0x200BB8 bytes then, not 0x400000 in case it matters.

I know that KBM has successed with this before and I also took a look at Prism's rom data and noticed KBM removed the data from bank 7F (between 1FC000 and 1FFFFF). Then again, he wrote some "strange" code just after that point in 0x200000 which might tell the game that the rom works properly after that point of the rom too or something like that (or maybe it's some other ASM work, no idea). But well, I've no idea how to do this so tips would be appreciated. Anyways, don't tell me to steal the information from Prism :P

Offline

#2 2011-02-06 21:43:06

Tauwasser
Member
Registered: 2010-10-16
Post 104/447

Re: ROM resizing

In-game scripts can usually not target banks 0x80 and above. However, this was primarily implemented to have the 7th bit signify halted scripts that will be resumed once an on-going script returns. I have never seen any averse effects of removing this, but I have obviously not coded the game to be sure.

Other bits of asm have the 7th bit of some bytes defined as flags for additional functionality, so it would not be possible to put those in the extended part of the rom.

For circumventing the block, you will have to alter the following offsets:

  • 25:7A04 - 0x00 0x00

  • 25:7368 - 0x00 0x00

cYa,

Tauwasser

Offline

#3 2011-02-07 02:18:36

koolboyman
Member
Registered: 2010-10-16
Post 21/203

Re: ROM resizing

Miksy91 wrote:

I'd like to make my hack 4MB large and know that a byte in the rom header defines the size of the rom data and after modifying it, you can add more data to the rom manually by adding 00's to the end of the file.
I made a quick test to see if the game is able to load a script from offset 0x200B50 but unfortunately, it didn't work. The game only freezed.
The size of the rom was actually 0x200BB8 bytes then, not 0x400000 in case it matters.

I know that KBM has successed with this before and I also took a look at Prism's rom data and noticed KBM removed the data from bank 7F (between 1FC000 and 1FFFFF). Then again, he wrote some "strange" code just after that point in 0x200000 which might tell the game that the rom works properly after that point of the rom too or something like that (or maybe it's some other ASM work, no idea). But well, I've no idea how to do this so tips would be appreciated. Anyways, don't tell me to steal the information from Prism :P

The "strange" code at 0x200000 is just a leftover test from using the Gameboy Development Kit.  http://gbdk.sourceforge.net/

I was trying to see if I could take the easy way out and program new minigames and such in C and let Prism call these games and exit successfully, It didn't work.  Here's the original file if you're interested.  It's nothing special, just move around with the D pad and change colors with A/B/Start/Select.

http://www.sendspace.com/file/47gmbj

Last edited by koolboyman (2011-02-07 02:21:06)

Offline

#4 2011-02-07 06:40:56

Miksy91
Member
Registered: 2010-10-16
Post 272/2,308

Re: ROM resizing

I get it, somewhat.
So because all of the bits aren't used for repointing in a byte, I can't use bank values 80-FF.

Tauwasser wrote:

For circumventing the block, you will have to alter the following offsets:

  • 25:7A04 - 0x00 0x00

  • 25:7368 - 0x00 0x00

Then again, I've no idea what you mean by this, or more accurately, by "circumventing the block".

Last edited by Miksy91 (2011-02-07 06:41:33)

Offline

#5 2011-02-07 15:35:32

Tauwasser
Member
Registered: 2010-10-16
Post 105/447

Re: ROM resizing

Write zeros to these offsets and you will be able to use the scripts you want to use in banks 0x80 thru 0xFF.

cYa,

Tauwasser

Offline

#6 2011-02-07 17:05:48

Miksy91
Member
Registered: 2010-10-16
Post 273/2,308

Re: ROM resizing

Okay, thanks.
I may do that but will save it for later to avoid glitches :)

Last edited by Miksy91 (2011-02-07 17:06:00)

Offline

#7 2013-03-24 18:33:09

FroggestSpirit
Member
Registered: 2012-03-12
Post 151/296
Website

Re: ROM resizing

Pokemon red, yes, as long as you do bank switching correctly. though you should update the rom header to match the size of your rom.


This isn't easy to say, but…
Music and ASM hacker

Offline

#8 2013-03-25 03:46:53

stag019
Idea Killer
Registered: 2011-01-05
Post 401/630

Re: ROM resizing

search
0147 - Cartridge Type
0148 - ROM Size


You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.

Offline

Board footer

Powered by FluxBB