Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Emulation & ROM Hacking

RNG Plays Pokemon - Page 1

RNG Plays Pokemon

Posted by: J92R
Date: 2019-03-24 23:18:30
So, courtesy of Crystal_, I have a version of RNG Plays Pokemon as a ROM hack of Pokemon Crystal. This was given to me about a year ago, problem is, it seems to only function with the help of the Gameshark code someone named Obskyr made for me.

That said, is there a way to re-create this "hack" for all the other Pokemon GB and GBC games (Red/Blue, Yellow, Gold/Silver)? Just kind of curious, cause there are ASM codes and everything on Crystal_'s YouTube, but since I'm stuck on Android, can't seem to recreate the ASM via hex editing.

I thought that if such was possible for Pokemon Crystal, then there should be an equally similar way to re-create this for the other games as well. If y'all want, I can provide the ROM (or an XDelta patch) and the code used to make it work, and maybe someone who has far more experience than I do can figure out a way to create patches of this code/RNG hack for the others.

I've already spent almost 3 weeks trying to figure this out purely in hex editing, but I can't seem to find how to make the gameshark code or the ASM memory hack of "change C2C7 to 0xFF" as a hex edit.


Ya know, I thought it wouldn't be as complicating to understand, but apparently either I'm a moron or it is literally impossible to hardcode RNG playing Pokemon without the use of a bot or gameshark code to activate it.

Re: RNG Plays Pokemon

Posted by: Parzival
Date: 2019-03-25 07:25:29
I'll give it a shot tonight. You'd have to add code to the end of the VBlank handler to write the value to RAM every frame. Normally we'd use DMA hijacks, but since this is already a ROM hackā€¦

PM me a link to the mod.

Re: RNG Plays Pokemon

Posted by: ISSOtm
Date: 2019-03-26 06:50:30
I think you can simply delete the bit of code that polls the joypad and instead copy hRandomAdd to hHeldButtons. Should be simple 'nuff.

Re: RNG Plays Pokemon

Posted by: Parzival
Date: 2019-03-27 22:16:42
true.

OP, i'll do it this weekend, this week is pretty busy and BGB don't like Wine so it won't run on my laptop.

Re: RNG Plays Pokemon

Posted by: J92R
Date: 2019-03-28 08:44:20

true.

OP, i'll do it this weekend, this week is pretty busy and BGB don't like Wine so it won't run on my laptop.


No worries mate, take all the time you need.

Re: RNG Plays Pokemon

Posted by: J92R
Date: 2020-05-19 09:30:23
So, I know its been a while, but any word on this? I unfortunately lost the hacked RNG rom because my phone broke, so been trying to implement this into the game, but now I don't have the gameshark code to activate it. Mind you, I don't know squat about disassembly, so if anyone has a patch for this, I'd greatly appreciate it, since hex editing Crystal_'s code in, doesn't actually do anything.