Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex
TrainerDex
TypeDex
UnownDex
More

Major Glitches
Trainer escape glitch
Old man trick
Celebi Egg trick
Select glitches (Japan)
SRAM glitch
CoolTrainer♀ corruption
LOL glitch
Rival LOL glitch
Super Glitch
ZZAZZ glitch
Pomeg corruption glitch (Glitzer Popping)
Tweaking
Elite Four door glitch (Japan)
Pokémon merge glitch
Pokémon cloning
Time Capsule exploit
Arbitrary code execution
Coin Case glitches
More

Other Glitch Categories
Glitches by generation
Glitches between two generations
Japan-only/language specific glitches
Music glitches
Natural glitches
Non-core series glitches
Non-Pokémon glitches
Officially acknowledged glitches
Recurring glitches
Dead glitches

References
Pokémon GameShark codes
The Big HEX List
Glitch Pokémon cries
GB programming
Curiosities
Debugging features
Easter eggs
Error traps
Glitch areas
Glitch myths
Non-glitch exploits
Placeholder texts
Pokémon glitch terminology
Unused content and prerelease information

Useful Tools
8F Helper
GBz80 to Items
Old man trick name generator
PATH (Prama's Advanced Tweaking Heaven)
Save file editors
Special stat/Pokémon converter
Trainer escape Trainer Pokémon finder

Affiliates
Legendary Star Blob 2 (Hakuda)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Technical
Site Source Code

Search Wiki

 

Search Forums

 

Author Topic: Programming the Snake game in Pokemon Crystal in real hardware!  (Read 568 times)

0 Members and 1 Guest are viewing this topic.

Crystal_

  • Distinguished Member
  • *
  • Offline Offline
  • 39 00 39 00 39 00 39 00
    • View Profile
Programming the Snake game in Pokemon Crystal in real hardware!
« on: January 02, 2017, 10:02:34 am »
During the part 2 weeks I picked up my Game Boy Advance SP and my spanish Pokemon Crystal cart and was determined to do something cool with them now that we know so much about how to exploit ACE in these games. So I thought I'd pick up the code of my Snake program that I once implemented in Pokemon Silver using an emulator and ported it to spanish Crystal. Obviously, doing this stuff in real hardware isn't the same story since you can't memory hack your way into whatever you want to achieve, so I had to come up with more efficient ways to do different things.

So yeah, if you want to see how I did it, just follow this link! It includes a demonstration video and covers all the process with a lot of details. The end will seem familiar, since it's mostly what TheZZAZZGlitch did in order to implement Pong into Pokemon Blue. It was a bit harder considering that ACE in Gen 2 isn't as accessible though.

Or if you prefer, here's just the video with a ligher explanation:

https://www.youtube.com/watch?v=g2mCyh7Y2xM
« Last Edit: January 02, 2017, 10:04:52 am by Crystal_ »

Princess Torchic ❤

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • The Chicken Girl
    • View Profile
Re: Programming the Snake game in Pokemon Crystal in real hardware!
« Reply #1 on: January 04, 2017, 07:05:42 pm »
Very cool document! :)
Hi! I identify as female.  She/her pronouns, please.

Online I most often use the username Torchickens or Chickasaurus.

Ah.. koucha ga oishii ♪





Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:
If you like, please contact me by private message here on the forums as I no longer check other places very often.

YouTube: http://www.youtube.com/user/ChickasaurusGL

I like to collect interesting video games. ^_^
https://www.vgcollect.com/Torchickens

Give love, receive love, repeat. But in order to love others you must first love yourself unconditionally, even if it means abandoning pressure from projects or taking time off work and empathise with the self as you are your own best friend. The key often is simply to follow your heart, your urges and have faith they are valid; use them to do what you want to do as long as it doesn't harm anyone, and/or sympathise and respect it as we all have bad days (even the prettiest rose has thorns but is still beautiful).

andr2535

  • GCLF Member
  • Offline Offline
  • Gender: Male
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Programming the Snake game in Pokemon Crystal in real hardware!
« Reply #2 on: March 20, 2017, 11:03:22 am »
Hi, I thought this was very interesting, but it doesn't work for the english version, so I thought I would make some sort of port.

I started on the assumption that the user already has an item pointing to the first box name.

So since some of the opcodes required for Crystal_'s implementation is missing from the english version I thought that since there is already a ram editor for the silver/gold coin case glitch
I could just edit that and make the box names point to the PC's first item.
http://pastebin.com/AEALLsqR

The assembled code:
p0'd0IéJ5
p0'm0(mn)éI5
'm55

Now that we can point to the PC's first item we need to get an item setup that can edit an arbitrary ram location, I have modified Crystal_'s
implementation of the RAM editor, such that it operates the same way as the coin case glitch one, except that you don't need specific move patterns
and it uses the BOX 4 name instead of BOX 9 name.(I hope it's alright me more or less copying the code...)
http://pastebin.com/YjZ4xEi5

it's probably easier to read the item requirement in the pastebin, so I won't copy them here :P
You can test that the code works with this code:
't9&/AC
should make your character green.

I made some item modifying codes to make it possible/easier to get some of the requirements:
http://pastebin.com/GWXC1u2Q

the only code of those that are really necessary are the code for the amount of items in the first spot in the item bag, this is the assembled version of the x144 code:
p0QéU2'd

I haven't tried yet, but I think that it would be trivial to do the rest of what is done in Crystal_'s implementation from here on.

I used a list of all the letters available in box names that I compiled myself because I couldn't find a similar list, I have thrown that on pastebin here:
http://pastebin.com/jxLY31kq
I also edited a list of opcodes for the game boy to only include those accessible using box names an image of it is attached,
hopefully they will be of use to someone :)