Main Menu
Main Page
Forums
New pages
Recent changes
Random page
Help

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

References/Resources
Databases
Disassembly projects
The Big HEX List
Interactive tools
Reference documents
Terminology

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

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: Dumb question because I'm new to all this...  (Read 430 times)

0 Members and 1 Guest are viewing this topic.

hello

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Dumb question because I'm new to all this...
« on: June 11, 2018, 02:13:33 pm »
How do people figure out what items to throw away (and what order to put them in, etc) when doing arbitrary code execution? I assume people don't just guess until something works, especially with the very specific things. Do they first write it as a program, translate it to binary and then translate that to the byte values, which they then translate to the corresponding item/amount combinations? I'm sorry if this is super obvious, but a quick Google search didn't give clear results and this all seems very interesting.

Epsilon

  • Member+
  • *
  • Offline Offline
    • View Profile
Re: Dumb question because I'm new to all this...
« Reply #1 on: June 11, 2018, 03:01:35 pm »
How do people figure out what items to throw away (and what order to put them in, etc) when doing arbitrary code execution? I assume people don't just guess until something works, especially with the very specific things. Do they first write it as a program, translate it to binary and then translate that to the byte values, which they then translate to the corresponding item/amount combinations? I'm sorry if this is super obvious, but a quick Google search didn't give clear results and this all seems very interesting.


The quantity of the item used, as well as the item's ID (what determines the item) are all values that represent Sharp LR35902 Assembly instructions (GBZ80, for short).

When 8f is executed, the Program Counter (PC, determines what instruction is to be executed next) runs through the party. The "bootstrapper" represents specific values that creates a small program, which redirects the PC to the bag. The values there, are also executed as LR35902 instructions.
grouchy

Sherkel

  • Hierarchitectitiptitoploftical
  • Administrator
  • *****
  • Offline Offline
  • Gender: Male
  • PSYNCIN' IN THE VaiN
    • View Profile
Re: Dumb question because I'm new to all this...
« Reply #2 on: June 11, 2018, 03:05:38 pm »
Do they first write it as a program, translate it to binary and then translate that to the byte values, which they then translate to the corresponding item/amount combinations?
To summarize Epsilon's post, yes.
« Last Edit: June 11, 2018, 03:06:05 pm by Sherkel »

Want to help with the wiki?
I don't have a habit of keeping Discord open, so direct inquiries are preferred through here.

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Staff
  • *****
  • Offline Offline
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Dumb question because I'm new to all this...
« Reply #3 on: June 12, 2018, 04:48:03 am »
When 8f is executed,
luckytyphlosion trigger warning.


Anyways, here's the general process:
0. Have idea about "thing" to do (eg. duplicate items)
1. Research how to do thing
2. Write ASM code doing thing
3. Translate to items
4. Refine code so it translates to a better item setup (no unique items, etc.)
5. Repeat 3 and 4 until satisfied
6. Publish

Veterans sometimes can go without step 4 or 5, by tuning the setup directly. But it's just a detail.
"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 !)

Tabbender

  • Knight of Space
  • Member+
  • *
  • Offline Offline
  • Gender: Male
  • Read Homestuck btw
    • View Profile
Re: Dumb question because I'm new to all this...
« Reply #4 on: June 15, 2018, 05:59:58 am »
http://www.pastraiser.com/cpu/gameboy/gameboy_opcodes.html

Using this you can see how each hex value will translate into an instruction (or a parameter for a former instruction). By knowing each item's hexadecimal value, and by converting the quantities to hexadecimal, you're able to essentially write code in your bag.
Issou la chancla

Duelist Of Roses

  • Duelist of Roses (DOR)
  • GCLF Member
  • Offline Offline
  • Gender: Male
  • "DOR CAN HE GLITCH IT" Yes but I'll fail!
    • View Profile
Re: Dumb question because I'm new to all this...
« Reply #5 on: June 29, 2018, 04:00:50 pm »
That isn't a dumb question. I have no idea how to do it and accidentally wrote a code where Nuggets infinitely multiply in the bag and that some items are located past the cancel button without a way to access them. I made the trigger having max money. I am sure there are people who could teach you how to do it. Otherwise, it is better just to look up how to perform specific ACE things. Maybe there are online programs that can tell you what steps to take for each code.
DOR

ISSOtm

  • The French Lord of Laziness (and a huge The Legend Of Zelda fan)
  • Staff
  • *****
  • Offline Offline
  • Gender: Male
  • Pewter City (B)rocks !
    • View Profile
    • My Little Website
Re: Dumb question because I'm new to all this...
« Reply #6 on: June 29, 2018, 05:54:43 pm »
The question has already been answered. Please do not bump threads.

Writing ACE codes is, as we explained, simply writing some GBz80 ASM, then translating that into items. GBz80 ASM is not a simple programming language, and there aren't many tutorials about it (I' m currently writing one), so it's not as easy as one Google search.
"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 !)