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: Pokemon Crystal Remote Code Execution  (Read 1107 times)

0 Members and 1 Guest are viewing this topic.

Evie (retired from head adminship)

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Pokemon Crystal Remote Code Execution
« Reply #15 on: November 28, 2019, 11:43:53 am »
The Problem is that it does like that : https://ibb.co/pRmGYwH

any fix

CTRL + G works but on the code it just shows -

As it's not automatic and sometimes BGB starts at the wrong place, the trick is to right click at the start of your code I think (i.e. D322 here) and access it via Go to; then BGB will update it.

Edit: In this case the display won't change because D321 was a one byte instruction (though if it was 2 bytes it would require right clicking method). Your code currently grabs FFD3, puts it into "a" and then puts "a" in D059 (instant encounter) (in contrast with e.g. 3E 15 at the start, which compiles as ld a,15 where 15 can be replaced with any value). When a is on the left side of the code it is storing something into the "a" register.

Additionally hope this may help https://iimarckus.org/etc/asmopcodes.txt
« Last Edit: November 28, 2019, 12:07:35 pm by Evie the Mother Hen ☽ ❤ »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory) Sorry I don't know who made the Eevee butterfly fan art :(

✿ Hi, I'm Evie. No longer active here other than to answer questions, messages. Sorry I've had to step down and have demoted myself (will explain later). I suggest contacting Photon-Phoenix/Yuzihax, and Abwayax.

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

Parzival

  • The Laziest Malware Enthusiast
  • Banned
  • *
  • Offline Offline
  • Gender: Male
  • who posted nudes in upstream
    • View Profile
    • (null)
Re: Pokemon Crystal Remote Code Execution
« Reply #16 on: November 28, 2019, 03:42:43 pm »
The Problem is that it does like that : https://ibb.co/pRmGYwH

any fix

CTRL + G works but on the code it just shows -

As it's not automatic and sometimes BGB starts at the wrong place, the trick is to right click at the start of your code I think (i.e. D322 here) and access it via Go to; then BGB will update it.

Edit: In this case the display won't change because D321 was a one byte instruction (though if it was 2 bytes it would require right clicking method). Your code currently grabs FFD3, puts it into "a" and then puts "a" in D059 (instant encounter) (in contrast with e.g. 3E 15 at the start, which compiles as ld a,15 where 15 can be replaced with any value). When a is on the left side of the code it is storing something into the "a" register.

Additionally hope this may help https://iimarckus.org/etc/asmopcodes.txt

you missed the "CTRL + G works but on the code it just shows -" part
when it just shows a - it's an invalid opcode and will pop the debugger when hit.

i'm also on keybase and bitchute but i don't have nifty buttons for those. Bitchute isn't ready yet, but will be eventually.

mood

Evie (retired from head adminship)

  • Veteran Contributor
  • *
  • Offline Offline
  • Gender: Female
    • View Profile
Re: Pokemon Crystal Remote Code Execution
« Reply #17 on: November 28, 2019, 04:17:11 pm »
Sorry about that, I didn't see the Ctrl+G part. Yeah Parzival is right, if there are any opcodes not on the opcodes text file they show as "-". That automatically brings up BGB debugger where other emulators e.g. VBA may act differently (invalid opcode at (address) message etc.) On a Game Boy this freezes, while on 3DS Virtual Console it skips them. (This actually makes me wonder if this is deeper technically/if invalid opcodes have separate effects that can only be understood on a hardware level/or if any obscure peripherals use them like what Shonumi is doing)
« Last Edit: November 28, 2019, 04:18:18 pm by Evie the Mother Hen ☽ ❤ »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory) Sorry I don't know who made the Eevee butterfly fan art :(

✿ Hi, I'm Evie. No longer active here other than to answer questions, messages. Sorry I've had to step down and have demoted myself (will explain later). I suggest contacting Photon-Phoenix/Yuzihax, and Abwayax.

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

Parzival

  • The Laziest Malware Enthusiast
  • Banned
  • *
  • Offline Offline
  • Gender: Male
  • who posted nudes in upstream
    • View Profile
    • (null)
Re: Pokemon Crystal Remote Code Execution
« Reply #18 on: November 28, 2019, 04:28:38 pm »
Sorry about that, I didn't see the Ctrl+G part. Yeah Parzival is right, if there are any opcodes not on the opcodes text file they show as "-". That automatically brings up BGB debugger where other emulators e.g. VBA may act differently (invalid opcode at (address) message etc.) On a Game Boy this freezes, while on 3DS Virtual Console it skips them. (This actually makes me wonder if this is deeper technically/if invalid opcodes have separate effects that can only be understood on a hardware level/or if any obscure peripherals use them like what Shonumi is doing)
Nope. The CPU hangs as the silicon isn't built to handle that set of bits as an instruction anymore so it goes apeshit.

i'm also on keybase and bitchute but i don't have nifty buttons for those. Bitchute isn't ready yet, but will be eventually.

mood

bbbbbbbbba

  • Staff
  • *****
  • Offline Offline
  • ... but things won’t change if you don’t speak!
    • View Profile
Re: Pokemon Crystal Remote Code Execution
« Reply #19 on: November 28, 2019, 05:27:42 pm »
Sorry about that, I didn't see the Ctrl+G part. Yeah Parzival is right, if there are any opcodes not on the opcodes text file they show as "-". That automatically brings up BGB debugger where other emulators e.g. VBA may act differently (invalid opcode at (address) message etc.) On a Game Boy this freezes, while on 3DS Virtual Console it skips them. (This actually makes me wonder if this is deeper technically/if invalid opcodes have separate effects that can only be understood on a hardware level/or if any obscure peripherals use them like what Shonumi is doing)
Nope. The CPU hangs as the silicon isn't built to handle that set of bits as an instruction anymore so it goes apeshit.
My guess would be that, since each instruction takes a different number of cycles, there must be a signal that tells the CPU that the previous instruction has finished and the next instruction can begin. And whatever undefined behavior the invalid opcode triggers, it never emits that signal, so the CPU never gets to the next instruction.

Parzival

  • The Laziest Malware Enthusiast
  • Banned
  • *
  • Offline Offline
  • Gender: Male
  • who posted nudes in upstream
    • View Profile
    • (null)
Re: Pokemon Crystal Remote Code Execution
« Reply #20 on: November 28, 2019, 09:12:19 pm »
Sorry about that, I didn't see the Ctrl+G part. Yeah Parzival is right, if there are any opcodes not on the opcodes text file they show as "-". That automatically brings up BGB debugger where other emulators e.g. VBA may act differently (invalid opcode at (address) message etc.) On a Game Boy this freezes, while on 3DS Virtual Console it skips them. (This actually makes me wonder if this is deeper technically/if invalid opcodes have separate effects that can only be understood on a hardware level/or if any obscure peripherals use them like what Shonumi is doing)
Nope. The CPU hangs as the silicon isn't built to handle that set of bits as an instruction anymore so it goes apeshit.
My guess would be that, since each instruction takes a different number of cycles, there must be a signal that tells the CPU that the previous instruction has finished and the next instruction can begin. And whatever undefined behavior the invalid opcode triggers, it never emits that signal, so the CPU never gets to the next instruction.
The clock signal, the thing that only has power in and clock out? :P

i'm also on keybase and bitchute but i don't have nifty buttons for those. Bitchute isn't ready yet, but will be eventually.

mood