Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#26 2011-11-28 09:15:16

zhengwei
Member
Registered: 2011-08-18
Post 129/140

Re: [R/B/Y] Adding Pokémon

IIMarckus wrote:
stag019 wrote:
Sawakita wrote:

Well, if you already knew everything, why didn't you just make a research with a hex editor to check where those RAM locations are read/written and then disassemble and edit the involved routines?

I didn't know everything, I just those locations in the RAM. I have done a search for the locations in a hex editor before, but seeing as how I don't know assembly, it's next to useless for me. I guess reading assembly wouldn't be too hard for me (if I had an opcode list at hand to reference constantly), but I'd also need a disassembler.

Set a watchpoint in BGB for those locations in memory, and the debugger will pop up whenever they’re accessed.

Here is a list of instructions and their effects.

I debug the hack rom by BGB, it's very powerful.

Offline

#27 2011-11-29 05:05:23

zhengwei
Member
Registered: 2011-08-18
Post 131/140

Re: [R/B/Y] Adding Pokémon

stag019 wrote:

No probs bro. :)

You should write a tutorial on how to do it. List all the locations and whatnot. Especially because reading your thread, you mentioned footprints, and I would have completely forgotten about footprints.

548,479

Last edited by zhengwei (2011-11-29 05:13:39)

Offline

#28 2011-12-01 08:48:00

zhengwei
Member
Registered: 2011-08-18
Post 132/140

Re: [R/B/Y] Adding Pokémon

Offline

#29 2011-12-01 09:41:54

Miksy91
Member
Registered: 2010-10-16
Post 636/2,306

Re: [R/B/Y] Adding Pokémon

That's pretty cool - I'll probably try to do this too with my Dark Future as I've a need for a new pokemon and wouldn't want to replace an existing one.

Offline

#30 2011-12-05 07:00:31

zhengwei
Member
Registered: 2011-08-18
Post 135/140

Re: [R/B/Y] Adding Pokémon

stag019 wrote:

No probs bro. :)

You should write a tutorial on how to do it. List all the locations and whatnot. Especially because reading your thread, you mentioned footprints, and I would have completely forgotten about footprints. :P

Miksy91 wrote:

That's pretty cool - I'll probably try to do this too with my Dark Future as I've a need for a new pokemon and wouldn't want to replace an existing one.

Now I'm busy, but tomorrow or someday I'll write a tutorial on the forum.

Offline

#31 2011-12-22 02:01:52

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

Re: [R/B/Y] Adding Pokémon

A new update to the program. I did a rewrite of most of the code to not copy the entire contents of the ROM into RAM, so it doesn't use a whole 1MB of RAM. The drawback here is that with the way it's currently programmed, it overwrites the file you listed instead of creating a new one. I don't see this as too much of a problem as long as everyone uses backups. Either way though, the zip now includes a small .bat file that makes a copy of ROM from pkmnred.gb to out.gb, then performs the extension on out.gb. It's easy enough to rewrite this to a different OS if need be, or you could just, you know, do it manually.

One other thing I did was structure the code a little more (or really all I did was move all my declarations to the top). This has the added bonus of allowing the program to be compiled in Open Watcom to make DOS or Win16 versions of it. You know. Just in case.

And I also fixed a bug where certain Pokemon's sprites weren't being pointed to the right bank due to a signed/unsigned error.

It's still located here.


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

Offline

#32 2012-04-13 23:43:21

ReadCutting-T
Member
Registered: 2012-04-12
Post 13/20

Re: [R/B/Y] Adding Pokémon

I know this hasn't been written on in a long time, although its well known. How hard would it be 'in theory' to fix the borked implementation of sprites  in Pokemon Brown (the whole weird lines thing that happens on my real GameBoy)? Is it to do with the fact that the sprites are decompressed or what? (I know I'm probably off the mark there, my knowledge is rather limited, for now at least. )

Offline

#33 2012-04-14 04:55:02

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

Re: [R/B/Y] Adding Pokémon

ReadCutting-T wrote:

I know this hasn't been written on in a long time, although its well known. How hard would it be 'in theory' to fix the borked implementation of sprites  in Pokemon Brown (the whole weird lines thing that happens on my real GameBoy)? Is it to do with the fact that the sprites are decompressed or what? (I know I'm probably off the mark there, my knowledge is rather limited, for now at least. )

Yes, it has to do with the fact that when cKoolboyman implemented the new sprites in Brown version, his routine to copy uncompressed sprites didn't take into account the fact you can't write to VRAM during V-Blank. This is fixed in some newer version of Brown. Additionally though, I've written a compressor that takes the need of writing your own routine, as well as the fact it allows sprites to be smaller (compessed... >_>).


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

Offline

#34 2012-08-05 21:55:25

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

Re: [R/B/Y] Adding Pokémon

Another update seeing as how I started writing this tutorial 2 years ago to the day. :P

Only a minor update, but
1. The error checking code for Pokemon >= 152 was changed into nops instead of checking for >= 255 so that in case someone fixes the FF being a terminator Pokemon, they can use it.
2. The assembly (an updated version based in part on assembly written by Danny-E 33) for Pokemon's banks is updated.
3.  An explanation for changing the Pokemon's base stats to include the image bank was added to the tutorial (although it was already implemented in the program).

Maybe someday it won't still be located here.

P.S. I've made some great strides in update the Pokedex and hope to finish documenting it soon; however, I need to confirm which cases of certain bytes are really pointers and which are just data, and fix Professor Oak's Pokedex rating stuff (which I've already disassembled most of).


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

Offline

#35 2012-08-28 04:54:41

Danny-E 33
Administrator
Registered: 2012-06-09
Post 88/1,023

Re: [R/B/Y] Adding Pokémon

Wow! That pkmn2.txt file was just full of information! That file will be very helpful to me with all its addresses, even though I don't plan on adding any Pokemon to my hack. :P

And it feels awesome to be creditted for something for the first time! :D So thank you!! I'm glad I can make a difference, and I hope to continue influencing the hacking community for a long time to come. :)

EDIT: Oh hey stag019, in that pkmn2.txt file, steps 20 and 21, you describe how to move the Pokedex pointer table and correctly repoint it, but did you intend to leave out moving and repoint the actual Pokedex entry data (height, weight etc)? I suppose it isn't entirely necessary, cause if you moved the pointer table, you could add another pointer for another Pokemon that points to the data for a new Pokemon that doesn't have to connect with the rest of the Pokedex data. I'm only wondering if that's what you were thinking and you left it out intentionally

I notice you did the same for the evolution data pointers. So, I assume you did that on purpose since each Pokedex entry has its own pointer, rather than the Pokedex/evolution data just being an array where each entry can be referenced automatically by an id just by knowing the starting location of the table.
I hope that all made sense the way I said it.

Last edited by Danny-E 33 (2012-08-30 03:09:55)


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#36 2012-11-21 02:26:44

Danny-E 33
Administrator
Registered: 2012-06-09
Post 268/1,023

Re: [R/B/Y] Adding Pokémon

Hey stag019, I took a look at the actual program this time and I think something went wrong..
I tried to drag-and-drop a clean Red ROM on the .exe, and then I opened it in Hex Workshop to compare it to the original to make sure it made changes and it was indeed very different.
And all the changes looked appropriate, although I actually couldn't recognize what a couple of the changes were for, but I didn't look in to it too deeply.
Anyway, the game freezes upon trying to load the title screen. Did I make a mistake?


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#37 2013-04-25 09:01:32

AtecainCorp.
Member
Registered: 2013-04-14
Post 26/627

Re: [R/B/Y] Adding Pokémon

It was nice for RBY Hackers... But Told me now... How to add new sprites into Pokemon RBY roms? If it was updater <For add 3 slots in GSC> It was easy... AGIXP work unfortenly only for GSC...


http://hax.iimarck.us/topic/3435/ - Pokemon Ruby GEN V GRAPHIC hack Thread
http://hax.iimarck.us/topic/3476/ - Unused Music Midi Thread
http://hax.iimarck.us/topic/3579/ - Some info about region Thonsu

Offline

#38 2013-04-25 09:19:43

80C
Banned
Registered: 2013-03-16
Post 240/1,257

Re: [R/B/Y] Adding Pokémon

Use TileM for convert images in 2bpp format & then use stag's tool, it's very useful, compress that bpp file obtained with TileMolester & then inject in in a free space into your Rom, then change the Data stats of your new pokemon inserting in the appropriate "slot" the adress for the front & back sprite.
How's divided Base Stat Table and what each "slot" means can be found on Bulbapedia.


I left this forum.

Offline

#39 2013-04-25 14:40:12

Danny-E 33
Administrator
Registered: 2012-06-09
Post 443/1,023

Re: [R/B/Y] Adding Pokémon

SirAllanNewlight wrote:

How to add new sprites into Pokemon RBY roms?

Isn't it

amazing

how many

people

ask this

question??


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#40 2013-04-25 15:57:39

80C
Banned
Registered: 2013-03-16
Post 248/1,257

Re: [R/B/Y] Adding Pokémon

at least I give a look or a try before and after have asked my question.


I left this forum.

Offline

#41 2013-04-25 17:02:21

Danny-E 33
Administrator
Registered: 2012-06-09
Post 445/1,023

Re: [R/B/Y] Adding Pokémon

Haha, yeah you're fine! I appreciate that about you.


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#42 2013-05-16 19:56:46

80C
Banned
Registered: 2013-03-16
Post 546/1,257

Re: [R/B/Y] Adding Pokémon

One question!

If I'm able to put new pics into the ROM, and if I'm able to add new palettes too (without replacing), could I be able to assign extra pics in certain calls without assign those pics necessarily to a Trainer?

I'll explain better what I want to do (sorry, I'm not native english):
Like the ROM Map says, Oak's sprite in the intro is assigned by pointer\adress, am I right?
Well, I should replace Trainer Oak's trainer with another one (like KBM did in brown replacing him with PalletPatrol) but lefting as previously Oak's pic in the Intro.

It's possible do that or do the "vice-versa" (add the new trainer pic, lefting Oak at his same position but assign to Trainer Oak's class to the new pic adress) ?


I left this forum.

Offline

#43 2013-05-16 21:30:51

Danny-E 33
Administrator
Registered: 2012-06-09
Post 483/1,023

Re: [R/B/Y] Adding Pokémon

Absolutely. The trainer class "Professor Oak" has no ties to the sprite being called in the Oak intro. Each one can easily be changed independently.

They have entirely separate pointers. Intro Oak's pointer is at $6155. Trainer Oak's pointer is at $39991.
By default, the pointers are both 5F 61, but you can change only one while leaving the other still pointing to the original sprite. My only advice is to add the new sprite in the same bank.


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#44 2013-06-26 07:56:55

80C
Banned
Registered: 2013-03-16
Post 906/1,257

Re: [R/B/Y] Adding Pokémon

I posted the answer too late, but in April I was finally able to add Chikorita:

pokemongrape02.png

It works perfectly, but I tried add Bayleef and there's no pokedex entry, + the cry Bayleef uses is Missingno's cry even if I added a his own cry.

My ROM is a bit different from Red (because it's based on Danny-E's graphic patch) and I left for now many steps, such as 18-19 and 20-21-22-23.

The graphic patch completes already steps 24-25 since the last byte is used for Sprite Bank.

Is the problem with Bayleef related to the pokedex entries or because I left for now steps 20-21?

Last edited by 80C (2013-06-26 07:57:40)


I left this forum.

Offline

#45 2013-07-31 09:11:20

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

Re: [R/B/Y] Adding Pokémon

I'm too lazy to compile a Windows version and upload it all right now, but here's some lines of code for you guys. You can either compile the code yourself, or figure out what it's doing and implement the changes yourself.

write_chunk(f, 0x7C3C, "\xFD\xD2", 2);
write_chunk(f, 0xF39F, "\xFD\xD2", 2);
write_chunk(f, 0xF517, "\xFD\xD2", 2);
write_chunk(f, 0x3AEC9, "\xFD\xD2", 2);
write_chunk(f, 0x3EC13, "\xFD\xD2", 2);
write_chunk(f, 0x4008B, "\xFD\xD2", 2);
write_chunk(f, 0x401E1, "\xFD\xD2", 2);

write_chunk(f, 0x40130, "\xFD\xD2\x06\x20", 4);
write_chunk(f, 0x4416A, "\xFD\xD2\x06\x20", 4);

write_chunk(f, 0x4017F, "\x01", 1);

write_chunk(f, 0xD8C7, "\x90\xD4", 2);
write_chunk(f, 0xF389, "\x90\xD4", 2);
write_chunk(f, 0xF50F, "\x90\xD4", 2);
write_chunk(f, 0x3AEC1, "\x90\xD4", 2);
write_chunk(f, 0x401D2, "\x90\xD4", 2);
write_chunk(f, 0x40390, "\x90\xD4", 2);
write_chunk(f, 0x4FE23, "\x90\xD4", 2);
write_chunk(f, 0x5C0DF, "\x90\xD4", 2);
write_chunk(f, 0x5C0E8, "\x90\xD4", 2);

write_chunk(f, 0x5E44, "\x90\xD4\x06\x20", 4);
write_chunk(f, 0x1D251, "\x90\xD4\x06\x20", 4);
write_chunk(f, 0x1E969, "\x90\xD4\x06\x20", 4);
write_chunk(f, 0x40144, "\x90\xD4\x06\x20", 4);
write_chunk(f, 0x44177, "\x90\xD4\x06\x20", 4);
write_chunk(f, 0x487B4, "\x90\xD4\x06\x20", 4);
write_chunk(f, 0x59045, "\x90\xD4\x06\x20", 4);

This should, theoretically, fix all the Pokédex pointer issues. The only thing left to fix after this is Professor Oak's rating system, which will glitch if you have more than 151 Pokémon. And I've already disassembled all of that code.


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

Offline

#46 2013-12-15 23:15:29

Danny-E 33
Administrator
Registered: 2012-06-09
Post 703/1,023

Re: [R/B/Y] Adding Pokémon


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#47 2015-07-23 23:23:34

WAFFAHOUSE
Member
Registered: 2015-07-23
Post 16/27

Re: [R/B/Y] Adding Pokémon

swampert22 wrote:
stag019 wrote:

Sorry, I had a long day at work, and after work. I should have it up by tomorrow after work (~5:30PM eastern time).

No worries mate, it's not like there's any hurry anyway! I'm going to take another look through the data today and see what I find!!



hey swampert I need to ask you a few questions about your gen1 hacking tools....


thanks
waffa

Offline

Board footer

Powered by FluxBB