Dwedit's Board

Enjoy the board

You are not logged in.

Announcement

Welcome, fellow visitors from other websites!
Whenever you download a file, I'd appreciate it if you posted a nice "Thank You" message, then tell me which site you came from. Thanks.
- Dwedit

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

bunbunnbunny
Slime
Slime
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
Slime
Slime
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
Alex Trebek (Administrator)
From: Chicago
Registered: 2004-12-12
Posts: 975
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
Slime
Slime
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
Slime
Slime
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
Slime
Slime
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.

Quick reply

Write your message and submit

Board footer

Powered by FluxBB