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
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 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: ACE: Manipulate encounter  (Read 549 times)

0 Members and 1 Guest are viewing this topic.

Dante

  • GCLF Member
  • Offline Offline
  • MissingNo is mainstream
    • View Profile
ACE: Manipulate encounter
« on: June 10, 2016, 11:55:42 am »
So, I need to manipulate my next encounter. How can I do that with ACE? More importantly, I need to know Assembly in order to write by myself the code or there's some kind of converter from C or C# or anything else (like XSE for GBA games)?
I want to fight the professor OAK in EU Version of pokemon Red with his real team, not glitched.
Any suggestion?

PS: I'm specifically interested in this method, I know I can achieve that with ditto's glitch

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: ACE: Manipulate encounter
« Reply #1 on: June 10, 2016, 03:58:20 pm »
So, I need to manipulate my next encounter. How can I do that with ACE? More importantly, I need to know Assembly in order to write by myself the code or there's some kind of converter from C or C# or anything else (like XSE for GBA games)?
I want to fight the professor OAK in EU Version of pokemon Red with his real team, not glitched.
Any suggestion?

PS: I'm specifically interested in this method, I know I can achieve that with ditto's glitch

Hi Dante. Modifying D059 (Pokémon/Trainer) and D05D (Roster) (or D058 and D05C in Yellow) will allow you to access every Pokémon with index numbers 1-199, and every real (and many glitch) Trainers in the game. The values for Professor Oak are 226 in D059 and 1 (Blastoise), 2 (Venusaur) or 3 (Charizard) in D05D.

The following code will enable you to access the Professor Oak roster of your choice.

Code: [Select]
3E E2 EA 59 D0 04 3E xx EA 5D D0 C9
Lemonade x226
TM34 x89 (x88 in Yellow)
TM08 x04
Lemonade x (roster)
TM34 x93 (x92 in Yellow)
TM08 x201

To look up the ASM interpretation of the code, refer to this page.

We can walk through the code I just wrote, below.

ld a, E2  - Register 'a' becomes E2; the value for Prof. Oak in the Big List
ld (D059),a - Load 'a' into D059 (instant encounter address)
inc b - Useless code, added for good item representation
ld a, xx - Register 'a' becomes the roster value (we want 1, 2 or 3)
ld (D05D),a - Load 'a' into D05D (Trainer roster)
ret - End code (actually return to the address in sp, which we have not changed)

Memory addresses can be found at Datacrystal and on the Pokémon Red disassembly.

There is a C-language to Game Boy game converter on this website that may be useful (although I've never tried this) if you want to make a game to execute such as Pong (first use 8F or ws m to store the code in free space such as boxed Pokémon, and then jump to it).

However, if you simply want to edit a memory address or call an existing ROM function, you're best off writing the raw code.

Hope that helps!
« Last Edit: June 10, 2016, 03:59:15 pm by Torchickens »
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.  She/her pronouns, please.


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.

Dante

  • GCLF Member
  • Offline Offline
  • MissingNo is mainstream
    • View Profile
Re: ACE: Manipulate encounter
« Reply #2 on: June 10, 2016, 04:24:57 pm »
Thank you a lot  ;D really good stuff

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: ACE: Manipulate encounter
« Reply #3 on: June 10, 2016, 04:44:04 pm »
Thank you a lot  ;D really good stuff
You're welcome!
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.  She/her pronouns, please.


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.

Dante

  • GCLF Member
  • Offline Offline
  • MissingNo is mainstream
    • View Profile
Re: ACE: Manipulate encounter
« Reply #4 on: December 08, 2016, 12:51:07 pm »
For future reference:
I had time to use this code only today: it didn't worked. I found out that the EU (Non english) version of the game have the addresses shifted: so you need 94 and 98 TM34 instead of 89 and 93.

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Wiki Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: ACE: Manipulate encounter
« Reply #5 on: December 10, 2016, 05:27:04 am »
Actually, for all addresses starting at ~CE00 (can't exactly determine where) there is a 5-byte shift in RAM addresses. You need to add 5.
"THOU SHALL NOT PASS !!"  RIVAL's effect, Gandalf.

Proudly glitching Pokémon Red and Yellow on a Black & White GB, Pocket GB, GB Color, GBA SP and new 3DS.

My Twitter (beware, I'm French)
My YouTube (same warning)

Here is an online tool to build 8F setups : GBz80 to Items !

They see me layzin', they ha-tin'...
Heavy contributor of the global augmentation of entropy (my room's is too damn high !)

Krys3000

  • The frenchie
  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • Head admin of the PRAMA Initiative
    • View Profile
    • PRAMA Initiative - Main french pokemon glitch website
Re: ACE: Manipulate encounter
« Reply #6 on: December 22, 2016, 06:15:17 am »
It's in WRAM, so $CF00 to $DFFF