Main Menu
Main Page
New pages
Recent changes
Random page

Arbitrary code execution
Pokémon cloning
Pomeg glitch and Glitzer Popping
Tweaking and voiding
Glitches by generation
Glitch categories

Disassembly projects
The Big HEX List
Pokémon cheat codes
Pokémon glitch terminology
Useful tools

Legendary Star Blob 2 (Hakuda) (日本語/Japanese)
Pokémon Speedruns wiki (English)
PRAMA Initiative (Français/French)
MissingNo. Glitch City (Italiano/Italian)
Become an affiliate!

Site source code

Search Wiki


Search Forums


Author Topic: Where to get started  (Read 189 times)

0 Members and 1 Guest are viewing this topic.

Princess Torchic Owl Lover ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I want to be a mother. 🦋 ✿
    • View Profile
Where to get started
« on: April 25, 2019, 11:52:39 am »
When I was originally first trying to make ACE codes, the following links helped.

You can start with simple instructions like

Code: [Select]
ld a, 15
ld [$d059] ,a
(3E 15 EA 59 D0 C9) to encounter Mew, and other 'RAM write' codes and modify them. The tables linked also tell you what a byte / opcode / operand maps to which item / quantity. In Yellow, a lot of addresses are shifted by 1, so in that example you would use ld [$d058], a instead for Yellow Mew.

If you use BGB's debugger, you can compile opcodes without doing it by hand, and see their byte representation. (right-click the screen, Other -> Debugger, use Ctrl+G to reach destinations quickly)
You can also set a breakpoint (double-click a location in the code panel, or use F2) at address $D322 (which corresponds to item 3's ID), or wherever your bootstrap code is, to see how it affects the registers and the memory. The step into (F7) and step over (F3) commands allow stepping through the execution one line at a time.

The game will keep running fine if you alter the value of all registers except sp, so feel free to use "padding" instructions such as "inc b" (maps to a Poké Ball) to make your code easier to set up and avoid rare/glitch items.

Later you can start reading the document ISSOtm posted for things like calling other addresses and setting conditions in your code. For example, when you want to call other functions, you can use the "call" instruction with the pointer (based on above memory map link) of your choice. Some functions in the ROM can be found here and require certain conditions. One of the most common, the bank switch (located at address $35d6) requires b and hl to be set to a specific value (which you can do with "ld b, xx" etc.), then when you use call 35d6 the address at b:hl is executed.

Hope this helps. ^_^ ✿

(EDIT by ISSOtm: fixed and clarified wording, changed resource links.)
« Last Edit: May 02, 2019, 11:52:36 pm by ISSOtm »

Here have some free flowers on every post ^^

(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Sex male, and spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman. Call me whichever pronouns you like. :)

War does not determine who is right or wrong; only who is loudest.
Athena follower. I know that some people view it as idolism, but I follow the spirit in relation to her and God too.

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3


  • Ringsome on the aquaface
  • Administrator
  • *****
  • Offline Offline
  • Gender: Male
  • Is it an illusion, or a tower built on sand?
    • View Profile
Re: Where to get started
« Reply #1 on: April 25, 2019, 08:11:33 pm »
Great guide! I think this works well as a sticky in this section.
« Last Edit: April 25, 2019, 08:14:58 pm by Sherkel »


  • GCLF Member
  • Offline Offline
  • Gender: Male
  • Oh snap, I destroyed my save file!
    • View Profile
Re: Where to get started
« Reply #2 on: May 12, 2019, 01:35:41 pm »
Well, i also started with simply changing memory, and now I'm up to jumping and stuff like that, thanks!
I am still working on opcodes like sbc, ld sp, etc. but I can make simple code enough for maybe a simple game.
If I am necro-bumping, I am sorry.
4 4 scares me on a deep emotional level I can't describe.