Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex

Major Glitches
Trainer escape glitch
Old man trick
Celebi trick
Select glitches (Japan)
SRAM glitch
CoolTrainer♀ corruption
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 glitch
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
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!

Search Wiki

 

Search Forums

 

Author Topic: Programming the Snake game in Pokemon Crystal in real hardware!  (Read 252 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_ »

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • 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! :)
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.

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

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

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 :)