Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-12-02 18:15:31

369/703

Pokémon Red disassembly project

So I guess I never formally posted about this here.

Basically, a while back I started disassembling Pokémon Red, and storing the results in a Git repository. The purpose is both to document code and data formats, and to make them easier to edit. (Though truly easy editing is still a ways off, repointing with an assembler is still much easier than in a hex editor.)

It’s coming along pretty well.

Lots of discussion goes on in the IRC channel.

Last edited by IIMarckus (2014-01-19 07:34:44)

#2 2011-12-02 23:08:24

Sawakita
Administrator
Registered: 2010-10-16
Post 236/365

Re: Pokémon Red disassembly project

Maybe advertising it some more will draw more people. If only there was a way to point out in the clearest way that using disassemblies is a really great way of ROM hacking (if not the very best among all the possible methods to create a hack, not to mention the fun of figuring out stuff).

IIMarckus wrote:

Though truly easy editing is still a ways off

I have to partially disagree with this sentence, because thanks to your disassembly I feel that hacking is a real walk in the park, most of the times.

--

Also, slightly off-topic, but I hope we can get again one of our good old brainstorming e-mail sessions (as soon as time availability increases a little!), specifically I'm determined to accomplish the addition of Unicode support to RGBDS, and solving the trouble concerning macros with variable number of arguments. Christmas holiday will come in handy hopefully!

Thanks again, in first place, for starting this project, by the way.

Offline

#3 2011-12-03 21:15:54

Tauwasser
Member
Registered: 2010-10-16
Post 242/452

Re: Pokémon Red disassembly project

So you disassemble by hand? I had something planned but put it off to an indefinite future for decompiling stuff... However, it involved data templates and the like, so I'm not sure what one will actually get out of this one...

cYa,

Tauwasser

Offline

#4 2011-12-04 08:02:15

372/703

Re: Pokémon Red disassembly project

Tauwasser wrote:

So you disassemble by hand? I had something planned but put it off to an indefinite future for decompiling stuff... However, it involved data templates and the like, so I'm not sure what one will actually get out of this one...

Generally I use BGB or a hex editor. I am interested in more automation, but I also want to keep things properly labeled and/or commented.

I do have a disassembly made by wlad lying around somewhere… for obvious reasons, though, it is more or less useless.

#5 2012-01-16 12:20:35

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

Re: Pokémon Red disassembly project

IIMarckus: You should sticky this thread and put a link to the IRC channel in the first post.

Sawakita wrote:

Maybe advertising it some more will draw more people.

I had an idea and was wondering what IIMarckus though of it. I'd be willing to pay for a little bit of advertising. I was thinking about buying the Project Wonderful ads on Jul and SMWCentral, because I figured those would be our best bets. If you okay it and design a banner, I'll pay for the ads.

Also, if you haven't already, one of us should post threads at romhacking.net and board2, as those are our other best bets.


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

Offline

#6 2012-01-17 18:43:33

GlitchMr
New member
Registered: 2012-01-17
Post 1/1
Website

Re: Pokémon Red disassembly project

I'm SMWC user, but I've decided to register there just to comment over this assembly (I'm surprised that somebody actually put ad of Pokémon disassembly on SMWC hacking site).

IF _RED
    INCBIN "gfx/red/introfight.2bpp"
ENDC
IF _BLUE
    INCBIN "gfx/blue/introfight.2bpp"
ENDC

So you have included Pokémon Blue too :). It's nice thing in case I will ever want to see differences. I don't see Pokémon Yellow, but I'm not surprised - it works differently internally, even if it's similar...

INCBIN "baserom.gbc",$1c98a,$1ca19 - $1c98a

Those ares from original worry me somewhat, but I guess it's not code so it wasn't included (so people couldn't assemble it myself without having original ROM, I guess)... I'm wondering for what those are used in actual game, but it's not that important.

Otherwise, I think it's nice job. I have a small question - is it possible to modify this disassembly, add additional instructions (it will move everything else) and it will still work?


Don't expect me to be active on this site. I'm not Pokémon hacker. My site - World 9

Offline

#7 2012-01-17 22:21:59

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

Re: Pokémon Red disassembly project

GlitchMr wrote:

I'm SMWC user, but I've decided to register there just to comment over this assembly (I'm surprised that somebody actually put ad of Pokémon disassembly on SMWC hacking site).

IF _RED
    INCBIN "gfx/red/introfight.2bpp"
ENDC
IF _BLUE
    INCBIN "gfx/blue/introfight.2bpp"
ENDC

So you have included Pokémon Blue too :). It's nice thing in case I will ever want to see differences. I don't see Pokémon Yellow, but I'm not surprised - it works differently internally, even if it's similar...

Yes, this is currently my task. I'm making good progress too. Yellow is still a ways off though.

GlitchMr wrote:
INCBIN "baserom.gbc",$1c98a,$1ca19 - $1c98a

Those ares from original worry me somewhat, but I guess it's not code so it wasn't included (so people couldn't assemble it myself without having original ROM, I guess)... I'm wondering for what those are used in actual game, but it's not that important.

Those areas are included because those are areas we haven't disassembled yet. Either we don't know if they're assembly or data or what, or we just haven't gotten around to it yet.

Nice to see some people from SMWC here through. :)


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

Offline

#8 2012-01-22 13:58:56

EagleEye
New member
Registered: 2012-01-22
Post 1/3

Re: Pokémon Red disassembly project

You've made it surprisingly readable; I can't read the ASM code, yet I still have a general idea of what's going on. Good work on the disassembly. :) I may edit ClassicMap to edit the pre-inserted versions of the maps later.

I may look into making that "pirate" Pokemon Black game once this gets farther along.

P.S. I saw your ad on SMWC.

Offline

#9 2012-01-22 21:58:26

YamaArashi
New member
Registered: 2012-01-21
Post 1/8

Re: Pokémon Red disassembly project

I have done a disassembly of 39E-12DA.

http://pastebin.com/KajqeQ6C

I tried inserting in the project and assembling it and it worked. I hope it can be included.

Offline

#10 2012-01-22 22:40:43

kanzure
Member
From: Austin, Texas
Registered: 2012-01-15
Post 4/19
Website

Re: Pokémon Red disassembly project

I am helping YamaArashi setup a mercurial repository on bitbucket to send pull requests, here. So that should be committed to a repo within the hour.

Offline

#11 2012-01-26 16:47:32

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

Re: Pokémon Red disassembly project

I'm working on a new Red ROM Map.  A lot more organized than the previous one.  Check it out.

https://bitbucket.org/iimarckus/pokered/wiki/ROMMap

Offline

#12 2012-01-28 05:54:00

Melash
Member
Registered: 2010-10-16
Post 80/132

Re: Pokémon Red disassembly project

koolboyman wrote:

I'm working on a new Red ROM Map.  A lot more organized than the previous one.  Check it out.

https://bitbucket.org/iimarckus/pokered/wiki/ROMMap

Koolboyman, have you done a similar ROM map for Gold? Not the one on DataCrystal.

Offline

#13 2012-02-05 01:10:31

EagleEye
New member
Registered: 2012-01-22
Post 2/3

Re: Pokémon Red disassembly project

I just downloaded this and rgbds-linux and, after messing with the Makefile to fix a few problems (which spring from my inability to any anything else to the PATH, due to it having a character limit or something), it compiled. Then I changed the player's default name to "AAAAAAAAAAAAAAAAA". Programmer's Notepad gave me an error, and I realized it was comparing baserom.gbc and pokered.gbc for equality. I commented out that check, and went to the player naming screen. Here's what I found:

pokereddisasmwroks.png

Then this happened, because I was being stupid with ASM.

thenthishappened.png

If I change it from Red to John, it displays like it should, though his name is still RED instead of John, but my point is that there are no longer any static references to addresses; they've all been replaced with labels. Perfect. Keep up the good work, guys. :)

Edit: Found where the second reference of RED was. It was actually a couple of lines down. I am an idiot.

Last edited by EagleEye (2012-02-05 01:15:40)

Offline

#14 2012-03-18 01:17:27

Xeon
New member
Registered: 2012-03-18
Post 1/1

Re: Pokémon Red disassembly project

This is amazing, I always hoped this game would be fully disassembled.

Offline

#15 2017-03-04 09:35:32

alex8989
New member
Registered: 2017-03-04
Post 1/3

Re: Pokémon Red disassembly project

When i try to change pokemon name it gives me this error
RROR: red/main.asm(2) -> main.asm(15) -> home.asm(900) -> home/init.asm(100) :
'SFX_1f_67' not defined
ERROR: red/main.asm(2) -> main.asm(15) -> home.asm(1381) :
'DisplayBattleMenu' not defined
C:\cygwin\bin\rgbasm.exe: Assembly aborted in pass 2 (2 errors)!
make: *** [Makefile:82: red/main.o] Error 1


Pls help.. I can change everything else but nit this.

Offline

Board footer

Powered by FluxBB