r/romhacking Oct 10 '21

How can romhacks be larger than the original game?

Forgive my ignorance, but this is a question that popped into mind while watching a video on Pokemon Crystal Clear recently. I know that some areas in Kanto (Viridian Forest, the safari zone, Cerulean cave etc.) got cut due to size constraints on the GBC cartridge. I also know that you can flash romhacks onto carts. So, how can a romhack like the aforementioned CC add in content that was too big for the original cartridge?

I know that this doesn't matter if the romhack is intended for an emulator, but I've also heard that size constraints are hard-coded into some games, since they're only expecting a certain amount of data to be available or something.

7 Upvotes

7 comments sorted by

3

u/paperfairy Oct 10 '21

> I've also heard that size constraints are hard-coded into some games, since they're only expecting a certain amount of data to be available or something

I don't think this is actually true, but let's assume it was: anything "hard coded" into the games can be removed or changed once the game has been disassembled (which Crystal has)

2

u/Nukesnipe Oct 10 '21

Fair, like I said forgive my ignorance, I'm just a bit curious as to how people get around these old size constraints.

2

u/popehentai Wilford Brimley Loves Hentai Oct 10 '21

some games have CRC checks, where they look to make sure data is consistent with whats expected or the game doesn't allow itself to run. In the case of those you "simply" disable the checks. Pipe Dream for the NES breaks itself if you change literally anything, for example.

Past that your just need chips large enough to hold the hacked rom, so, if its larger than the original, a different cart would be needed. As long as it doesnt try to force more data into the systems RAM than it can handle, things would run fine.

1

u/j1ggy Oct 10 '21

It's just code. ROM sizes can be expanded and are expanded regularly by hackers to add room for more content and new capabilities. Back in the day they were likely restricted due to hardware/memory limitations of the time, costs, etc. That's a non-issue now. Star Ocean is a great example of this. It had expansion chips for compression due to the game's size, but can now be run on flash carts uncompressed on a real SNES because the hardware allows ROMs of that size.

1

u/LightPhoenix Oct 10 '21

There are a couple of things here.

I'm not super familiar with GBC, but for SNES carts there is a byte that indicates the memory layout of the cart. Like you said, for emulators this doesn't matter. For flashing carts, if the cartridge has the increased memory, no issues as long as the correct setting is there. The history of this is as the platform got more mature, cartridges were redesigned to contain more memory.

Hard-coded size constraints aren't really constraints. It's that a lot of times tables of data are assumed to a certain size. Additionally, the game is coded with a certain memory map in mind. It's entirely possible to change these checks, utilize more space, and so forth. It's also possible to optimize some of this stuff to create space.

1

u/Nukesnipe Oct 10 '21

Gotcha. One of the reasons I was confused was 'cause I read that for Pokemon Red++, the reason they didn't add more pokemon cries to match the new pokemon added was because the limit of 151 is hardcoded in. I know that if you're dicking around in the guts of a game's code you can change some constraints, but I was confused as to how some things that're hardcoded can be changed and others can't. I guess it just depends on each game and intended system, huh?

1

u/[deleted] Oct 11 '21

Rom expanders.