hobune Channels Contact About Donate

How to reverse engineer & patch a Game Boy ROM

Back to video page | Download comments jsonl

Comments (archived 2022-07-03 15:13; 78 top, 101 total comments)

HashCache 2020-04-24 05:58:46

Wow. Great video! It's absolutely crazy how people have managed to reverse engineer the entire game that builds to a bit for bit identical to the real rom

34 likes
Jimmy De La Garza 2021-02-18 20:48:27

This is awesome, I applied the basic principles in your video and was able to reverse engineer a portion of my favorite all SNES game Chrono Trigger to find a portion of the code where experience is added. At first I found the value where the total experience was stored in ram, and use breakpoints to walk backwards until eventually I was able to find the code where it was calculated. In Chrono Trigger they calculate how much xp to add after each monster is killed in battle, and it's stored in a ram value that is then used after the battle is complete to display and ultimately add to the character's pools. There was a CLC just before the ADC, so i changed the opcode in that byte of the rom to the one for ASL, which doubles experience. I made a new game genie code from this and now I get to enjoy this game again without all the extra grinding required to level up. It's so much better than some of the other codes I've seen which just grant levels or experience.. the game plays much smoother and you still feel a sense of accomplishment. Anyway, thank you for walking through this, this is my first time diving into assembly even though I'm a veteran software developer of 25 years and it's alot of fun, I can't wait to make patches for my other favorite games now.

8 likes
Re Cecure 2020-04-20 06:01:31

My childhood right here. Patching modding game roms, adding new elements, and maps. Quality Content 🙂

26 likes
Replies (1)
manaquri 2020-04-21 12:35:44

Back then I stopped at making action replay codes.

3 likes
Any Key 2020-05-07 21:22:40

These tools are much nicer than the hex editors and patch makers we were using twenty something years ago when hacking all of the Pokémon encounters into a single game and translating G/S

7 likes
Replies (1)
Squirrelies 2022-01-14 06:43:36

bruh I remember being in a dalnet irc channel and translating gold and silver back in the day with a group of people. Small world.

0 likes
HawaiianGuy 2021-03-17 22:05:58

You are amazing! Being able to create and explain how to make possible the biggest rumour on videogame history is just mind blowing. Thank you very much!!

3 likes
RomanPort 2020-04-20 07:22:28

Loving these collaboration videos between you and LiveOverflow! Can't wait to see more!

9 likes
Tigrou7777 2020-04-21 23:22:23 (edited 2020-04-21 23:22:57 )

I know Ghidra (and the fact it can output C like code), but I did not know it worked with GB roms. Thanks for the video.

98 likes
Replies (2)
Knee Snap 2020-04-25 05:23:47

It's because ghidra turns stuff into an intermediary language.

0 likes
Willaim Woods 2020-11-23 00:04:21

Well the GB is Z80 based. So it would be reletively easy to add support into ghidra

1 like
Tom Bee 2020-04-21 12:20:36

Great video! I'm interested in your course but unfortunately it's taking place during working hours. Will there be a fully remote course at some point or are you planning to deliver the course on a weekend sometime soon? I have a piece of firmware that I would like to tweak but struggling to get started so I'm definitely interested.

0 likes
Duuqnd 2020-04-23 08:48:53

Very fascinating stuff. I've always wanted to try to reverse engineer old games like this. It's too bad the game I want to reverse engineer uses some strange kind of compression making it difficult to decompile/disassemble the code. I'll get around to it eventually for sure though.

1 like
Replies (1)
Michael 2020-04-25 11:04:50

What game?

0 likes
Ale0x78 2020-04-19 22:32:55

Awesome Video!!! Game modding is what brought me into this field years ago, so there a tad of nostalgia for me too...

1 like
The 64th Shadow 2020-10-26 11:55:04

One thing I want to be able to do is dissect and disassemble compressed data.

I've been translating a Japanese-Only NeoGeo Pocket Color game, and while the text characters were uncompressed graphics, the menus use compressed graphics, which I cannot directly edit.

1 like
Amy Carter 2020-05-21 10:12:06

1:32 Is BGB just as good as Sameboy?
The text scrolling doesn't bug me that much, but that was cool to see automated all the same. Thing is, wouldn't that affect all message box type scenes, including Hall Of Fame and such?

1 like
Nick Aliferopoulos 2020-04-20 10:55:07

This is amazing content. Thank you for posting!

1 like
Retro Rick 2020-05-08 22:22:49

Could I suggest reverse engineer popular NES games, due to NesDevWiki all important registers are there explained in an exhausting detail, which would make reverse engineering easier

3 likes
Rashira 2021-02-20 05:26:56

That's insane. About 12 years ago I had pointed out to someone on yahoo answers that asked if the mew myth was real, that it might be possible for someone to make a romhack that implements it via working in the ROM code...and someone has actually gone and done it.

0 likes
Draemon 12 2020-04-19 20:14:51

Nice video ! I love this collaboration ! Hope this will get you some new subscribers ^^

5 likes
Michael 2020-04-25 11:01:35 (edited 2020-04-27 03:41:50 )

Awesome video and subscribed. I love Gameboy since I got one as a kid as well as reverse engineering gameboy games!

1 like
Dustin Watson 2020-05-14 22:08:29

Just found your channel and watched a few videos. Liked and subbed. Amazing vids and nostalgia overflow!

1 like
Eduard Khil 2020-11-23 14:34:41 (edited 2020-11-23 14:37:01 )

Hi, maybe I'm a little late but I'd like to know how you knew which steps to follow in order to export a functioning ROM. I mean, how did you know that you had to order each block of memory because otherwise it would't have worked? Did you learn it somewhere? If yes, where? I tried searching for this specific thing but didn't find anything, please share!

0 likes
Jiml Kosmo 2020-04-19 19:58:58

Great vid! Next stop should be an arduino/esp based sd cartridge.

25 likes
Replies (1)
Proxy 2020-04-22 13:18:52 (edited 2020-04-22 13:20:02 )

you could go a tiny step further and use an SRAM chip in combination with an ATmega/ESP. so when you start the gameboy it loads a program from SD into the SRAM chip, which then functions as ROM (ie the gameboy cannot write to it, only the ATmega/ESP can).
that way the gameboy doesn't have to access the ATmega/ESP directly, which should make the code easier as the ATmega/ESP doesn't need to constantly check for reads/writes from the gameboy, it just needs to load data into it once every time it's powered on.

6 likes
Henrik Andersson 2020-04-29 11:13:29 (edited 2020-04-29 11:14:19 )

You got very lucky that the game is so simple that it actually has a dedicated wait for dialogue loop. No event oriented programming here.

0 likes
Michael Wentworth-Bell 2020-05-04 12:47:36

These videos are soooooo good! Thankyou!

1 like
MotherTurf 2021-03-09 10:33:21

Amazing work thank you

0 likes
Bruh 2022-06-15 21:46:50

I just discovered your channel and I already love it !

0 likes
JP 2020-04-19 22:25:47

Awesome, I'm a little lost, where did you learn to use Ghidra so well?

0 likes
Mistah MegaManFan 2020-11-14 15:20:16

Serious question hope you can help - how do you patch the GBA NES Classic games so they work correctly on an EverDrive X5? I own a dozen of these and want to play backups but they’ve got loads of unnecessary ram size checks and stuff like that which make them run like crap when detected.

0 likes
Ariss 2020-04-20 18:55:54

im curious about how similar this is to GBA reverse engineering

0 likes
MoritzDerErste 2020-04-22 08:36:15

Super cool video! I noticed your channel via LiveOverflow. Keep up the good work!

1 like
chud babies 2021-02-16 04:14:48

@2:31 that certainly is the easy way.
Would be more interested in building teh game to register a smooth auto-scroll mod, instead of a janky hack.

0 likes
Phosphenius 2020-04-22 11:48:06

Amazing that people still hack GB games in 2020!

11 likes
Paprika 2020-04-23 00:37:09

Very nice video!

1 like
B Targ 2020-04-21 15:55:15

Every Stacksmashing and LiveOverflow video ends in, "there was a MUCH simpler way of doing this"

0 likes
Caleb Leeb 2020-04-20 20:20:01

I didn't think it was that rare, but I'm subscribed to you and hadn't watched any LiveOverflow... hope you get some traffic in the reverse direction haha

5 likes
My Boredom 2020-07-14 02:18:48

excelent video, i will try reverse engineering

0 likes
Shylesh Srinivasan 2020-04-25 16:18:52

Thanks a lot for this video !

1 like
TheLoneAlpaca 2020-04-20 13:37:12

Awesome and interesting video!!

1 like
MaxReckless99 2020-11-15 03:56:12

this guy is crazy...in a good way. amazing

2 likes
gopherbobz 2022-06-10 14:51:03

Ha I love that you made the truck move!!! Brings a smile to my face.

0 likes
Hans MĂŒller 2020-04-22 07:20:27

Will there be videos about the GBA/GBA roms?

0 likes
Basti 2020-04-19 19:44:34

Nice, can't wait to watch this

2 likes
sĂŒrĂŒnen adam 2021-07-26 23:08:55

Is it possible to modify sound files with this?

0 likes
Jeremy Dahan 2020-04-19 22:44:04

Actually, I discovered Live Overflow via your channel !

38 likes
Doorway 2020-04-20 05:10:22

Wow that was awesome

1 like
Ju's Channel 2020-04-23 09:26:00 (edited 2020-04-23 09:26:59 )

Hey

Could you maybe do some ds/3ds modding stuff

And i mean not save editor (the editors that are already finsished)
I mean real hex modding etc (i tried mod my game saves of animal crossing new horizons but its all in old chinese and doesnt make sence at all)

Would be nice

Nintendo ds/3ds or switch modding



Thanks in adventage


Sincerly,
3ds_hacker

0 likes
El Virus 2020-04-24 17:18:02

I'm trying to replicate the Mew Myth on the code, does anybody know what line is Vermillion Dock in wild_mons.asm?

1 like
Replies (2)
stacksmashing 2020-04-24 19:47:57 (edited 2020-04-24 19:48:36 )

It's line 94! :)

0 likes
El Virus 2020-04-24 21:18:12

@stacksmashing Thanks for the quick response, I love when the YouTubers respond to their comments (I know that when you've got 29,7m subscribers one more is nothing but consider-me subscribed), I'll try it tomorrow( I imagine that we're in different time zones). Keep making these amazing videos.

0 likes
Marcel W 2022-06-01 19:03:33 (edited 2022-06-01 19:13:20 )

i know its old but... you say at 7:15 "go to the backtrace and use the earliest entry" ... WHICH backtrace ???
you dont show where it is and in the backtrace you have open, its dont there...
where i can get the similar point (by you "5d57")...
PS: im german and have to make it for german versions...

0 likes
Robin Hood 2020-05-02 05:33:45

From where start revese engineering and how to master it ??

0 likes
Jack Price 2020-04-19 19:50:47

Legit just got so excited that you uploaded

39 likes
Fouad Al 2020-12-27 03:38:29

OMG this is so cool

0 likes
EmbodyingOcean 2020-04-19 19:44:28

tysm that's so cool!

5 likes
Yunix 2021-08-12 20:07:37

Thanks bro! It was hard to understand because im 13 and from germany but thanks! Sub from me ;)

0 likes
Reloo 2020-04-21 19:31:48

WOW, what a video!

2 likes
Bekircan DAL 2020-04-20 10:34:01

This is awesome..

1 like
Similak Child 2021-03-13 20:12:04

There is a NES Famicon ROM that I want to convert to an SNES ROM.. is that possible?

0 likes
Bill 2020-04-19 19:51:06

very cool

2 likes
⑩; é»’ă‚€ă‚żăƒ / ⑩; Black Ferrets 2020-05-04 17:48:40

Now flash it to an empty card

0 likes
DisabledMallis 2020-04-20 05:55:44

Good stuff

2 likes
Jonah Meiers 2020-04-28 03:00:20

Question, Did stacksmashing make Ghidra why his name also has Ghidra Ninja?

1 like
Replies (2)
stacksmashing 2020-04-28 10:24:01

I did not :) I initially created this channel to just give some Tipps for working with Ghidra - as it got more “successful” than I had expected I also realized that I like to make videos about more than Ghidra, so went back to my “old” nick

1 like
Jonah Meiers 2020-04-28 21:36:43

stacksmashing / Ghidra Ninja ok thanks

1 like
Mystic 2020-04-29 23:31:31

Your videos are like a rollercoaster

0 likes
Replies (2)
stacksmashing 2020-05-03 09:46:05

Not sure if that's a compliment :D

1 like
Mystic 2020-05-03 09:48:35

@stacksmashing it is!

0 likes
Kruemmelbande 2020-04-23 11:46:05

That dont work on Windows. The debugger opens a console, but i cant write anytging into it, or have any more options.

0 likes
Replies (1)
Valkon 2020-12-29 17:08:36

By complete luck when I ^C on terminal I was able to execute commands, but the terminal doesn't look as a helpful as on MAC. I tried on WSL also but with similar results.

0 likes
Arathok 2020-04-19 23:09:43

So know MewTwos Cave is full of Truck Cabins!

19 likes
ClosestNearUtopia 2021-05-20 12:18:29

Please patch the truck, create a dungeon, let us catch mew ‘legit’ instead of doing the hack a the ?celladon? Bridge!:)

0 likes
DisabledMallis 2020-04-20 05:55:59

You should make a discord server

1 like
Mohamed Edrees 2020-11-17 22:46:34

Brilliant I have a challenge I know some brilliant mind like you Will solve it I need help with a Korean nintendo wii Locked on error 003 after update there is way to fix it but it's a painful and I can't find a modchip if there any way through software please and a lot of thanks to you for your time and work

1 like
WizardofHacker 2020-04-27 14:42:57

I know this is probably a small thing but GBA4iOS? Jailbroken? :)

1 like
Replies (4)
stacksmashing 2020-04-27 15:42:33

Nah just self-compiled :)
https://github.com/CocoaBob/GBA4iOS

1 like
WizardofHacker 2020-04-27 15:57:12

stacksmashing / Ghidra Ninja Did you sign the IPA with AltStore or just push it with Xcode? Love to see people working on these things.

0 likes
stacksmashing 2020-04-27 16:11:22

I compiled it myself and signed + installed it with Xcode

0 likes
WizardofHacker 2020-04-27 16:31:22

stacksmashing / Ghidra Ninja I see. Well great work anyways; love your content so keep up the great work. Some of the most educations but then simultaneously skill-testing content and experiences out there. Much love <3

0 likes
undefined0 2020-11-15 18:16:12

I really don’t know what you are saying but I like it

0 likes
FuzzyTriangles 2021-02-19 16:39:26

Refers to Red as Ash...

Literally unwatchable

0 likes
Nerdsachen 2020-04-20 22:07:32

I didnt get much of this, but its nice

0 likes
Replies (2)
Un Named Channel 2021-02-09 18:18:01

A bit like females, I don’t get much of them but they are nice when I do

1 like
Nerdsachen 2021-02-09 19:56:57

@Un Named Channel hahahah😂👍

0 likes
iProgramInCpp 2020-04-22 05:44:13 (edited 2020-04-22 05:44:31 )

All your item needs fulfilled!

Isn't that a reference to "All your base are belong to us"?

1 like
Replies (3)
noxabellus 2020-04-23 06:32:22

wtf? not all sentences beginning with "all your" are a reference to that meme, this doesnt even sound similar

also, pokemon red and blue predate that meme anyways

0 likes
iProgramInCpp 2020-04-23 07:25:38

@noxabellus it's an example of engrish, just like all your base are belong to us

0 likes
Starwort 2020-05-13 10:32:27

@iProgramInCpp 'All your item needs fulfilled' is valid as a sentence though (even if it would be better followed by 'here')

0 likes
Gregory Mirabella 2020-05-14 15:15:59

laughs in mew glitch

1 like
Klemza K 2020-04-22 01:33:58

nice...

1 like
KHIVY 2021-02-11 18:11:46

ça c'est du parlé Anglais à la "accent Français" ...

0 likes
Freezer 2021-07-17 22:16:51

brooo u are insaaaaane

0 likes
Mer 2020-07-15 12:11:03

"Joystick" is NOT the + that you can find in the console. Its called "D-PAD".

0 likes
Enes Kıdık 2020-04-21 18:53:52

You are singing.

0 likes
wulfenlord 2020-04-28 05:41:30

Disliked & reported to Nintendo, you flipping pirate

0 likes
Feed Brains 2021-05-15 13:51:40 (edited 2021-05-15 13:51:58 )

.

0 likes
Ciao Kid 2020-05-15 01:54:36

Bist du Luxemburger?

0 likes
Replies (1)
stacksmashing 2020-05-15 17:57:19

Nop

0 likes