Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-07-13 14:51:41

supershadow64ds
Member
Registered: 2014-07-13
Post 1/11

Red/Blue Disassembly build help

Recently I've been getting into Generation I hacking, and I found out about the PokeRed Disassembly on Github. I followed the instructions for setting up Cygwin and the other things (gits? I'm not sure what to call them.), but when I reach the step where I need to easy install "git://github.com/drjll/pypng.git@master#egg=pypng", it fails for some reason. I'd add a spoiler, but I don't know BBCode by heart.

These are the errors I get:
$ easy_install git://github.com/drjll/pypng.git@master#egg=pypng
Doing git clone from git://github.com/drjll/pypng.git to /tmp/easy_install-Fy96mj/pypng.git@master
fatal: remote error:
  Repository not found.
Checking out master
sh: line 0: cd: /tmp/easy_install-Fy96mj/pypng.git@master: No such file or directory
Processing pypng.git@master
error: Couldn't find a setup script in /tmp/easy_install-Fy96mj/pypng.git@master

And when I try to "make" the file, I get this error:
$ make
Preprocessing 412 files...
Traceback (most recent call last):
  File "extras/pokemontools/gfx.py", line 5, in <module>
    import png
ImportError: No module named png
Makefile:49: recipe for target 'red/audio.o' failed

I have no idea what I'm doing, I was just told not to Hex edit.

Offline

#2 2014-07-13 15:00:18

Danny-E 33
Administrator
Registered: 2012-06-09
Post 802/1,025

Re: Red/Blue Disassembly build help

It's "drj11", not "drjll".
So make only fails because easy_install failed.

Also, this forum doesn't support spoilers.


Red Hack: Pokémon Prototype

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

Offline

#3 2014-07-13 15:12:48

supershadow64ds
Member
Registered: 2014-07-13
Post 2/11

Re: Red/Blue Disassembly build help

Danny-E 33 wrote:

It's "drj11", not "drjll".

Well that was a failure on my part.

Anyways, thank you for the correction. I'm sure now I might actually be able to progress. :P

Edit: Even after fixing that typo and installing whatever needed to be installed, "make" still fails with the following error:
$ make
rgbasm -h -o red/audio.o red/audio.tx
RGBAsm v1.08c (part of ASMotor 1.10-linux)

Usage: rgbasm [-b chars] [-g chars] [-i path] [-o outfile] [-p pad_value] file
C:\cygwin64\usr\local\bin\rgbasm.exe: invalid option -- h
Makefile:49: recipe for target 'red/audio.o' failed
make: *** [red/audio.o] Error 1

Last edited by supershadow64ds (2014-07-13 15:16:54)

Offline

#4 2014-07-13 15:50:34

Danny-E 33
Administrator
Registered: 2012-06-09
Post 803/1,025

Re: Red/Blue Disassembly build help

You have an outdated version of rgbds.
http://iimarck.us/etc/rgbds.zip


Red Hack: Pokémon Prototype

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

Offline

#5 2014-07-13 21:08:19

supershadow64ds
Member
Registered: 2014-07-13
Post 3/11

Re: Red/Blue Disassembly build help

Danny-E 33 wrote:

You have an outdated version of rgbds.
http://iimarck.us/etc/rgbds.zip

Thank you for the continuing support, I have one final question.
I have edited and changed what I wanted to, however when attempting to make the file, I get this error:
$ make
rgbasm -h -o red/main.o red/main.tx
rgblink -n pokered.sym -m pokered.map -o pokered.gbc red/audio.o red/main.o red/text.o red/wram.o
Unable to load fixed ROMX section into bank $0B
Makefile:61: recipe for target 'pokered.gbc' failed
make: *** [pokered.gbc] Error 1

Offline

#6 2014-07-13 22:13:45

ShantyTown
Member
Registered: 2013-12-04
Post 97/344

Re: Red/Blue Disassembly build help

I think you mentioned that you're inserting a new back sprite. Usually, that error message means that the ROM bank has too much data in it. In the gameboy, ROM is split up into "banks" which are simply 0x4000 byte chunks of data. If bank B (ranges from offsets 0x2C000 - 0x2FFFF) has more than 0x4000 bytes in it when you try to compile or build the project, it gives that error message.

Can you describe how and what you tried inserting?

Last edited by ShantyTown (2014-07-13 22:15:25)

Offline

#7 2014-07-14 00:16:33

supershadow64ds
Member
Registered: 2014-07-13
Post 4/11

Re: Red/Blue Disassembly build help

ShantyTown wrote:

Can you describe how and what you tried inserting?

Well, to begin with, I changed the Trainer Sprite of Red and his back sprite to that of a female trainer. I began with opening the PNG of the Red backsprite and pasting in a 28x28 sprite of the female trainer depicted in the following image:
http://ghost-missingno.deviantart.com/a … -339796166
I had noticed that the colors were off, so I opened up an unedited sprite and used an eyedropper to take the colors from a regular sprite and poured them (globally) onto the four colors.

I did the same for the Red trainer front sprite and the title screen sprite and the overworld sprites (though I keep forgetting to do the bicycle sprites).

Next, I thought the Pokemon sprites for Red/Blue looked stupid so I copied the files from the Yellow MonSprites folder over to Red's and replaced them. I did the same for Brock, Erika and Blue's trainer sprites.

Then I edited the Battle screen layout (HP Bars and arrows) to look more like Gold/Silver. I didn't add anymore color to 1BPP sprites, but I did change the HP logo sprite in the 2BPP tileset to use the HP bar color in addition to black and white. (Could this be the problem?)

I then changed the slot layout to have more 7's (because I'm a dirty little cheater who hasn't found the payout ASM file yet. I also replaced a slot thing at the end of the list. Perhaps I missed pressing Tab or enter and made the ASM file mess up?)

Lastly, I changed Mewtwo's base stats to all 200 for... some reason.


Edit: Rom Bank B (according to Data Crystal) seems to be used for Pokemon sprites and the Trainer Bio graphics, so possibly it was caused by my copying and pasting from Yellow to Red/Blue?

Last edited by supershadow64ds (2014-07-14 00:43:00)

Offline

#8 2014-07-14 03:16:58

Danny-E 33
Administrator
Registered: 2012-06-09
Post 804/1,025

Re: Red/Blue Disassembly build help

Well you're using the disassembly, so no need to reference Data Crystal... Just look at the source!

SECTION "Pics 3" is the beginning of bank $B.

But to answer your question, yes, the problem is that you replaced the red sprites with the yellow sprites which happen to be big enough to fill up the bank.

I think you can get away without having to edit UncompressMonSprite if you just change the value of PICS_3 (look at the very top of main.asm) to an unused bank. (the last used bank number is $2c)

The reason I suggest this is because bank $B is also used for some battle engine stuff and some graphics tiles.

So if you move the sprites to a new bank (leaving the battle engine stuff and the graphics tiles behind in bank $B), then it might give you enough extra room so that the sprites all fit together in one bank.

If they still don't all fit in one bank, then you will have to edit how UncompressMonSprite determines the bank number for a sprite.


Red Hack: Pokémon Prototype

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

Offline

#9 2014-07-14 16:28:37

supershadow64ds
Member
Registered: 2014-07-13
Post 5/11

Re: Red/Blue Disassembly build help

Danny-E 33 wrote:

I think you can get away without having to edit UncompressMonSprite if you just change the value of PICS_3 (look at the very top of main.asm) to an unused bank. (the last used bank number is $2c)

Before I do this, how many unused banks are there? Or, really, how many banks can there be? If I go over the standard limit, will the ROM be extended or will anything further than the last bank be discarded?

Edit: This may be a bit of a problem.
So far, it only seems to affect Gastly for some reason. For clarity, Gastly is in PICS_1, and I did not change the bank of that. All the other Pokemon in PICS_1 seem to be fine.

Edit2: Oh! Of course! The sprite of the original Gastly is much larger than that of Yellow's. All I need to do is change the size of the PNG, or just go into the base stats ASM file.

Last edited by supershadow64ds (2014-07-14 22:16:31)

Offline

#10 2014-07-14 22:11:16

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

Re: Red/Blue Disassembly build help

supershadow64ds wrote:
Danny-E 33 wrote:

I think you can get away without having to edit UncompressMonSprite if you just change the value of PICS_3 (look at the very top of main.asm) to an unused bank. (the last used bank number is $2c)

Before I do this, how many unused banks are there? Or, really, how many banks can there be? If I go over the standard limit, will the ROM be extended or will anything further than the last bank be discarded?

rgbfix pads the rom out to 1MB (up to bank 0x3F), and 2MB if you go past that (up to bank 0x7F). If you don't care what bank it goes in, just remove the ", BANK[PICS_3]" altogether and the linker will figure it out for you.

SECTION "Pics 3", ROMX

Banks are only specified for consistency with the original game.


supershadow64ds wrote:

Edit: This may be a bit of a problem.
So far, it only seems to affect Gastly for some reason. For clarity, Gastly is in PICS_1, and I did not change the bank of that. All the other Pokemon in PICS_1 seem to be fine.

Pic dimensions are part of the .pic file (it's the first byte). That part is working fine. The problem is there's a redundant definition in base stats.

db $77 ; sprite dimensions

This means it expects the pic to be 7x7 when it's placed on the screen. Since Gastly's pic size in Yellow is 5x5, it's reading in 7 tiles for each column instead of 5, causing the cascading effect.

You can change this to $55 to fix it in the short term. The permanent fix is to instead include the first byte of the .pic.

INCBIN "pic/bmon/gastly.pic", 0, 1

Offline

#11 2014-07-14 22:20:02

supershadow64ds
Member
Registered: 2014-07-13
Post 6/11

Re: Red/Blue Disassembly build help

comet wrote:

rgbfix pads the rom out to 1MB (up to bank 0x3F), and 2MB if you go past that (up to bank 0x7F). If you don't care what bank it goes in, just remove the ", BANK[PICS_3]" altogether and the linker will figure it out for you.

Oh excellent. Now I can quit my worrying.

Also, thank you for the help of why the Gastly sprite was so messy, though I figured it out before hand and... kind of forgot to edit my post. Whoopsies.

Offline

Board footer

Powered by FluxBB