Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Dumb question because I'm new to all this... - Page 1

Dumb question because I'm new to all this...

Posted by: hello
Date: 2018-06-11 15:13:33
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.

Re: Dumb question because I'm new to all this...

Posted by: Couldntthinkofaname
Date: 2018-06-11 16:01:35

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.

Re: Dumb question because I'm new to all this...

Posted by: Guy
Date: 2018-06-11 16:05:38

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.

Re: Dumb question because I'm new to all this...

Posted by: ISSOtm
Date: 2018-06-12 05:48:03

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.

Re: Dumb question because I'm new to all this...

Posted by: Tabbender
Date: 2018-06-15 06:59:58
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.

Re: Dumb question because I'm new to all this...

Posted by: Duelist Of Roses
Date: 2018-06-29 17:00:50
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.

Re: Dumb question because I'm new to all this...

Posted by: ISSOtm
Date: 2018-06-29 18:54:43
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.