Dwedit's Board

Enjoy the board

You are not logged in.

Announcement

User passwords may have been corrupted, if you can't log in, use the "Forgot Password" feature. If you still can't log in, contact me and I can try to manually reset your password.

#1 2021-05-21 6:17:17 pm

bunbunnbunny
Member
Registered: 2021-05-21
Posts: 1

Patch for Pokemon Crystal on goomba color

I used goomba color for the first time recently and found that Pokemon Crystal was graphically broken.  Looks like a lot of people tend to report this game.

I took a look in a debugger and it seemed like the BG tiles were being overwritten with a combination of what appeared to be tiles meant for elsewhere in memory as well as some other stuff I couldn't identify.  I took a guess that this was some sort of DMA or bankswitching issue and also noted that other users seem to consistently report Crystal as broken, but not Gold or Silver. 

I then read through this (https://github.com/pret/pokecrystal) disassembly project for Crystal and compared it to the analogous project for Gold and Silver.  I focused on parts making use of DMA, although there were some uses of DMA that definitely work with goomba color without modification.  I'm still unsure what the final issue is, but I've put a workaround in my fork.
https://github.com/kmatzen/pokecrystal/ … omba_color

tldr - This replaces the code for loading fonts and icons, blanking out the BG map, and opening / closing the menu in Crystal with code that I pulled out of Gold.

I'd like to eventually learn what the incompatibility with goomba color might have been, but I can't put too much more time into this.

Last edited by bunbunnbunny (2021-05-21 6:17:53 pm)

Offline

#2 2021-05-22 3:07:03 pm

shash
Member
Registered: 2021-05-22
Posts: 1

Re: Patch for Pokemon Crystal on goomba color

This is rather close to how Shockslayer patched his Pokemon Crystal Clear rom hack (you can see the release notes here).

About 1.5 years ago, I was also curious about the issue, because a lot of people wondered about why that was failing, so I spent an evening looking at it, and I was lucky enough that my first theory actually fixed the issue. In the end I decided to not release any information besides a few videos, because I already had my answer, and I felt uneasy sharing it, because it is, to be honest, mostly used for piracy.

In the end, I uploaded my changes to a private github repo in case my feelings change some day, but with your patch and ShockSlayers one, I don't think my fixes are needed anymore.

Any way, long way to say good investigation and patch (even if I personally don't play Pokemon) :)

Last edited by shash (2021-05-22 3:09:02 pm)

Offline

#3 2021-05-24 7:48:30 am

Dwedit
Administrator
From: Chicago
Registered: 2004-12-12
Posts: 1,017
Website

Re: Patch for Pokemon Crystal on goomba color

If it involves DMA, it might be because Goomba Color has a really half-assed implementation of DMA.  It's basically just a memory copy that happens immediately.  HBlank DMA is supposed to happen at particular times after the transfer begins (ie, during hblank parts of the scanline), rather than all at once up front.


"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#4 2021-06-19 6:26:48 pm

koalabuttz
Guest

Re: Patch for Pokemon Crystal on goomba color

thanks so much for doing this research and putting together a workaround! Does it fix all the visual glitching or just some? I followed the instructions to build (using your fork instead) but the ROM that came out seems to have the same issues and I'm a little confused at what I could've done wrong.

#5 2021-06-19 6:47:21 pm

koalabuttz
Member
Registered: 2021-06-19
Posts: 1

Re: Patch for Pokemon Crystal on goomba color

well this is... embarrassing. I was using the code from the master branch, not the goomba_color specific branch. Gotta love user error. It works perfectly! Thank you once again :)

Offline

#6 2021-07-28 8:48:29 am

G-S
Guest

Re: Patch for Pokemon Crystal on goomba color

I hope this isnt too late or something. I've been trying to do this for a good few hours now, but I'm completely stumped. When trying to use the 'git clone' command with Cygwin using the HTTPS link to the goomba_color branch, but all I receive is a fatal: repository error that the link couldn't be found... Perhaps I am just doing it completely backwards and dont realize it, but some instructions on how to do this specifically would be wonderful as I've already tried using the INSTALL.MD as a general guide with no luck. I'm no good at these things...

#7 2021-07-28 9:39:33 am

G-S
Guest

Re: Patch for Pokemon Crystal on goomba color

G-S wrote:

I hope this isnt too late or something. I've been trying to do this for a good few hours now, but I'm completely stumped. When trying to use the 'git clone' command with Cygwin using the HTTPS link to the goomba_color branch, but all I receive is a fatal: repository error that the link couldn't be found... Perhaps I am just doing it completely backwards and dont realize it, but some instructions on how to do this specifically would be wonderful as I've already tried using the INSTALL.MD as a general guide with no luck. I'm no good at these things...

I actually just figured out what to do! Figures I needed to just switch branches after cloning the master branch. It works like a charm, thank you.

#8 2021-08-11 4:43:39 am

Piccolo99
Member
Registered: 2021-07-11
Posts: 1

Re: Patch for Pokemon Crystal on goomba color

Hey, i Wanted to say thank you, both bunny for the fork and koalabuzz for pointing out my same error :D. I just have one question. The game is definitely playable. There is still one last glitch that bothers me a little. When changing route, npcs and player sprite fuckes up. Does anyone know what could possibly cause that?

Offline

#9 2021-11-05 6:27:19 pm

Sakitoshi
Member
Registered: 2021-11-05
Posts: 1

Re: Patch for Pokemon Crystal on goomba color

found the final issue and fixed it here https://github.com/Sakitoshi/pokecrysta … omba_color
the sprites get garbled because the sign indicating a map change still used hdma.
i was able to replace the function with an equivalent that pokemon prism uses and now it's working correctly on goomba color :)

Offline

#10 2021-11-08 4:01:34 am

Silver
Guest

Re: Patch for Pokemon Crystal on goomba color

Sakitoshi wrote:

found the final issue and fixed it here.
the sprites get garbled because the sign indicating a map change still used hdma.
i was able to replace the function with an equivalent that pokemon prism uses and now it's working correctly on goomba color :)

This is an incredible find! Just like this whole thread.
The only minor issue I have with your build are the flickers when certain textboxes appear (e.g. pressing Select), otherwise this is perfectly playable. Thank you so much everyone, it has been way too long.

#11 2021-11-22 5:59:24 am

Hariainm
Guest

Re: Patch for Pokemon Crystal on goomba color

Does this work with other versions of the game (specifically the spanish version)?

#12 2021-12-13 2:43:37 am

Ethan
Guest

Re: Patch for Pokemon Crystal on goomba color

works amazing, tysm

#13 2022-01-07 2:40:30 pm

mint
Guest

Re: Patch for Pokemon Crystal on goomba color

Sakitoshi wrote:

found the final issue and fixed it here
the sprites get garbled because the sign indicating a map change still used hdma.
i was able to replace the function with an equivalent that pokemon prism uses and now it's working correctly on goomba color :)

is it possible to get this working for pokemon perfect crystal? (romhacking.net/hacks/4935/)

i've tried installing the IPS patch over the top of the compiled rom, and theres a weird stuttering issue when it comes to walking.

#14 2022-03-14 1:58:25 pm

It's moon UwU
Guest

Re: Patch for Pokemon Crystal on goomba color

Would it be possible to get a download link of the "working correctly on goomba color" version? :333

#15 2022-03-21 12:30:16 pm

Its moon UwU
Member
Registered: 2022-03-21
Posts: 3

Re: Patch for Pokemon Crystal on goomba color

Hi there, I've been looking into this issue some time and after reassembling the branch that you have made and testing it on my GBA I've decided to try to solve the same issue for the spanish and german versions of the game, so I've created another workaround from an old fork of the spanish and german versions of the game dissassembled that you can find following this link https://github.com/ItsMoonUwU/pokecrystal
If you have any problems assembling them, I can help. Also you can use this tutorial https://www.pokecommunity.com/showthread.php?t=462735 but you need to use "make crystal-es" or "make crystal-de" instead of the last command "make" and it doesn't work with the current version of rgbds, you need to use 0.4 or earlier versions. Sorry if I said something wrong, it's my first time using github and all this stuff hehe ;3 (and srry 4 my english). If you want I can also post a tutorial about how to reassembly this specific branch.

Offline

#16 2022-03-21 12:41:46 pm

Its moon UwU
Member
Registered: 2022-03-21
Posts: 3

Re: Patch for Pokemon Crystal on goomba color

I also think that it would be nice to release the patched versions for the future visitors of this thread.

Offline

#17 2022-04-13 12:48:41 pm

GDub
Guest

Re: Patch for Pokemon Crystal on goomba color

Thanks so much for your hard work, you folks are awesome. I'm super stoked that I can finally play Crystal on my gba cart. Hopefully this thread can keep its momentum and someone can find a fix for the text box flicker issue mentioned above from Sakitoshi's branch. It plays wonderfully in conjunction with the RTC changer patch by infinest. Cheers!

#18 2022-05-05 10:34:23 am

Hariainm
Guest

Re: Patch for Pokemon Crystal on goomba color

Its moon UwU wrote:

I also think that it would be nice to release the patched versions for the future visitors of this thread.

Link to your GitHub is down :(

#19 2022-07-17 12:37:27 pm

cache
Member
Registered: 2022-07-17
Posts: 2

Re: Patch for Pokemon Crystal on goomba color

It works!  I've never used github before and wow... that was an adventure.  I also succeeded in porting over my original crystal .sav using goombasav (as someone instructed in another thread), and am currently having a blast playing my old android emulator file on an actually GBA via EZ4.  Thank you, you are all geniuses. 

I hope to write up a guide to streamline the process and help other complete ignoramuses like myself.

Offline

#20 2022-11-17 9:22:35 am

Tornesse
Guest

Re: Patch for Pokemon Crystal on goomba color

Hi guys, Ive just came across this while looking for an answer on why the heck my ezflash doesnt play crystal. Can u please tell me how I download the rom u fixed? Thanks!

#21 2023-06-14 5:54:20 pm

AintSoSunny
Guest

Re: Patch for Pokemon Crystal on goomba color

Tornesse wrote:

Hi guys, Ive just came across this while looking for an answer on why the heck my ezflash doesnt play crystal. Can u please tell me how I download the rom u fixed? Thanks!

It's a git repo meaning you have to build it yourself. Instructions are in INSTALL.md, but when cloning the repository you have to change the repo to the goomba_color branch or else you'll just build a normal Pokémon Crystal rom

I'm still in the process of building one right now lol, haven't manually built anything from a repo until today >.>

#22 2023-06-14 6:56:06 pm

AintSoSunny
Member
Registered: 2023-06-14
Posts: 1

Re: Patch for Pokemon Crystal on goomba color

AintSoSunny wrote:

welp I tried to compile but get this error:

rgbasm -L -Weverything  -o audio.o audio.asm
make: rgbasm: No such file or directory

not sure if this board is still active but ¯\_(ツ)_/¯

UPDATE

I got it to work!

All you gotta do is go to the RGBDS directory and rename each executable file to where it has no extension (see image below)
h3T771d.png

UPDATE 2

I made an xdelta patch from both versions (1.0 & 1.1) for easier access to people that may be struggling to build this

(There is an exsisting pack on RHDN but it uses ips which is an inferior patching format and I had issues using the roms patched using the ips patches)

Last edited by AintSoSunny (2023-06-17 9:42:57 am)


Attachments:
Attachment Icon example.png, Size: 22,410 bytes, Downloads: 21
Attachment Icon Pokémon - Crystal Version - kmatzen+Sakitoshi's goomba_color Fix Patch.zip, Size: 7,786 bytes, Downloads: 72
Attachment Icon PokeCrystal goomba_color.xdelta, Size: 3,440 bytes, Downloads: 15
Attachment Icon PokeCrystal goomba_color (1.1).xdelta, Size: 3,472 bytes, Downloads: 31

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman