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: Increment a byte in RAM: Crash (Pokémon Blue)  (Read 1538 times)

0 Members and 1 Guest are viewing this topic.

NunoLava1998

  • GCLF Member
  • Offline Offline
  • When you change a byte in RAM: The universe breaks
    • View Profile
Increment a byte in RAM: Crash (Pokémon Blue)
« on: April 24, 2016, 10:05:59 am »
I found that, in RAM at FF80 (Pokémon Blue), incrementing the first byte by 1 will crash the game. But, if you increment the first 3 bytes, some stuff dissapears.



That's how sensitive Pokémon Blue is. Yep.

danny

  • Decamark Collector and Pokémaniac
  • Member+
  • *
  • Offline Offline
  • i hate being alive
    • View Profile
Re: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #1 on: April 24, 2016, 11:49:21 am »
FF80 is actually part of the ROM that is mostly the same in all gb games
ralsei is my son.

discord: dani#5700

NunoLava1998

  • GCLF Member
  • Offline Offline
  • When you change a byte in RAM: The universe breaks
    • View Profile
Re: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #2 on: April 26, 2016, 05:01:00 am »
Also, at FF80, if you change the 9th byte to FF, the game will crash. For some reason, FE and below doesn't crash the game. But FF just crashes the game for no reason.

danny

  • Decamark Collector and Pokémaniac
  • Member+
  • *
  • Offline Offline
  • i hate being alive
    • View Profile
Re: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #3 on: April 26, 2016, 02:34:05 pm »
Also, at FF80, if you change the 9th byte to FF, the game will crash. For some reason, FE and below doesn't crash the game. But FF just crashes the game for no reason.
0xFF actually calls ROM address $0038, which is an 0xFF opcode. You can see why it crashes.
ralsei is my son.

discord: dani#5700

NunoLava1998

  • GCLF Member
  • Offline Offline
  • When you change a byte in RAM: The universe breaks
    • View Profile
Re: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #4 on: April 27, 2016, 01:04:04 am »
And in 0040, if you replace the first byte with FF the game crashes.

And it didn't say "Unknown opcode FF at 0038", it just went to that line type of crash.

Hālian

  • That worldbuilding/micronations/MTG guy
  • Member+
  • *
  • Offline Offline
  • Gender: Male
  • Buried under a pile of OS-tans…
    • View Profile
    • Hoennese Realm
Re: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #5 on: April 27, 2016, 01:53:05 am »
Because opcode ff is known — it's rst $38. And what's at 0038? Always ff. So the stack floods with an unending deluge of 39.
The Hoennese Realm is under construction. Watch this space!



All sprites made by Naitekiakki, except:
Recolored Gardevoir made by me

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: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #6 on: April 27, 2016, 04:26:24 pm »
Literally unending. (Hopefully the values written to ROM don't enable SRAM edition, otherwise... meh)

(Fake) hysterical time : Why didn't they just put a simple ret there ? Aw yeah, I forgot how many glitches exist in Gen I games thanks to wonderful programming. They should get a special award for these. I love these games : "Sup guyz, for the first three champions the data structure {beaten, TM got} is this one" "But I want this completely different one now !" "Okay, but I'm too lazy to change back the previous."
"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 !)

Wack0

  • Coder, reverser, beta collector [BetaArchive staff]
  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • cBRH - Doing nothing since 2k7
    • View Profile
Re: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #7 on: April 27, 2016, 04:53:39 pm »
(Fake) hysterical time : Why didn't they just put a simple ret there ?

probably they had a breakpoint set there when debugging.
C H E C K E D . B U I L D S . A R E . A W E S O M E N E S S

BetaArchiveSoftHistory Forumsirc.rol.im #galaxy,#softhistory

Also known as The Distractor.

Shane, please stop telling children that there's a Mew outside under the delivery trucks. - Management

Pokémon: arbitrary code execution 1996-2016

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: Increment a byte in RAM: Crash (Pokémon Blue)
« Reply #8 on: April 28, 2016, 12:24:58 am »
Makes no sense to me, but maybe...
"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 !)