Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-12-30 15:03:12

Fotomac
Member
Registered: 2015-10-25
Post 124/296

Rom extension?

How do you extend a Gen I/Gen II ROM, for example, to allow more than 256 Pokémon?

Offline

#2 2015-12-30 16:05:29

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,207/3,475

Re: Rom extension?

What you're wanting to do has nothing to do with rom size, like the title assumes. What you would have to do is basically modify or rewrite every routine in the game that does anything with Pokémon IDs so it reads 2 bytes instead of 1, reformat the data so that Pokémon IDs are stored as 2 bytes instead of 1, and test everything really well to make sure you caught everything. The same type of thing would have to be done if you wanted more than 256 Attacks or more than 256 items. The problem is not the amount of space in the rom, the problem is that a single byte can only be 00 to FF which means it can only reference 256 unique IDs, so you would have to redo it to use 2 bytes if you want more.


And since I know you are going to ask, unfortunately no, I cannot give you an exact example explaining every minute detail of how to add this feature off the top of my head, because I haven't done it. I'm sorry.

Last edited by Mateo (2015-12-30 16:07:12)

Offline

#3 2015-12-30 16:57:26

Fotomac
Member
Registered: 2015-10-25
Post 125/296

Re: Rom extension?

So 3 bytes for Pokémon IDs, for example (as there are presently 721 Pokémon IIRC)?

Offline

#4 2015-12-30 17:40:00

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,208/3,475

Re: Rom extension?

Why would you need 3 bytes? 2 bytes gives you 65535 IDs (because it can be anywhere from 0000 to FFFF, and FFFF is 65535).

Offline

#5 2015-12-30 17:48:29

Fotomac
Member
Registered: 2015-10-25
Post 127/296

Re: Rom extension?

Oh! Silly me!

Offline

#6 2015-12-31 14:42:22

Pum
Member
From: Spain
Registered: 2015-10-23
Post 19/71

Re: Rom extension?

It would be probably be more reasonable to use 1 byte + 1 bit from an unusued segment of a byte, like the level (Since the in-game max is 100 which is 01100100 in binary, you can use that first bit (which is always gonna be 0 normally) to differenciate between one table of pokemon and another, so you'd technically have 510 slots avaliable. I think there is a patch that does this? With moves you could use the bit on the PP byte , since the max is 64 (01000000), you have another 0 there ready to be used.

However you still need to modifiy routines to utilize this, It would take a lot of time and knowledge.

Remember, learn how to crawl before trying to run a marathon

Offline

#7 2015-12-31 16:50:07

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,212/3,475

Re: Rom extension?

I do remember people discussing something similar to what you suggested in the past, but I don't think it ever got to the point of being a patch. I didn't bring it up though because 1) he mentioned wanting all 700+ Pokemon which that wouldn't cover, and 2) he is hacking Gen 1 using the disassembly, and that example was originally discussed in regard to Gen 2 using the normal rom, so I'm sure the thread would have just confused him.

But of course, as you said, he needs to learn the basics before he goes attempting to rewrite half the engine like he wants to. Hell, I don't even want to try to tackle that myself right now lol.

Last edited by Mateo (2015-12-31 16:52:39)

Offline

#8 2015-12-31 21:53:32

comet
Member
Registered: 2012-04-09
Post 621/675

Re: Rom extension?

The bottleneck is modifying the code. Size limitations are not really a factor. That said, there is already an unused byte. That would be a lot easier than the top bit of pp (which is already used for counting pp ups).

Offline

#9 2016-01-01 00:54:53

Pum
Member
From: Spain
Registered: 2015-10-23
Post 20/71

Re: Rom extension?

comet wrote:

there is already an unused byte. That would be a lot easier than the top bit of pp (which is already used for counting pp ups).

What byte is that one? I am not planning on making a 510 moves patch now but It would definitely be on my todo list. Im not an ASM master but I've already done some little routines.

Last edited by Pum (2016-01-01 00:55:14)

Offline

Board footer

Powered by FluxBB