Hacking I need a debbuger for switch games

Arthurfogo7

Member
OP
Newcomer
Joined
Jul 31, 2022
Messages
23
Trophies
0
Age
22
Location
Brazil
XP
137
Country
Brazil
I need to debug a switch game, but I don't know exactly how to do it through emulators, so that's why I'm asking here. Need some help. (I want to write a agent script for translation purposes).
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,403
Country
United Kingdom
What is an agent script as it pertains to translation of games? I have never heard the term before and a search does not reveal much.

Anyway two main approaches to debugging Switch games.

1) The Switch itself has an OS running in the background which means you can debug on the Switch itself (obviously needing a hacked one).
https://gbatemp.net/threads/atmospheres-gdb.602435/
Bit slow and a bit clunky compared to whizz bang emulators of older devices but Switch emulation is quite demanding and options there are a bit more limited thus it is very useful for a lot of people.

2) Switch emulation is not as nice as some of the NES, SNES, GBA and DS stuff but it does expose a GDB option
https://yuzu-emu.org/entry/yuzu-progress-report-jun-2022/
GDB (short for GNU debugger) is an approach some emulators take to allow debugging without having to write it all yourself (no easy task and there are not that many ROM hackers, tool assisted speedrunners, homebrew devs and commercial devs needing such things relative to other concerns).
You then attach a third party debugger to the thing; all the big ones like ghidra https://ghidra-sre.org/ ( https://wrongbaud.github.io/posts/ghidra-debugger/ is for the GBA but the principle applies to everything) , radare2 https://book.rada.re/debugger/remote_gdb.html and IDA https://hex-rays.com/ida-pro/ida-debugger/ (IDA is expensive paid for software but the gold standard by which everything else is measured)

All that said does translation need a debugger? 95% of most things being done in translation work without it, and it only becomes necessary when you start doing things like 8 bit encoding conversions, variable width fonts and the like. If the game is heavy on the scripting within the text engine then it can help figure it out but that is something of a rarity as well, and even then for translation purposes unless it is colliding with the encoding conversion or fonts you are less likely to need it.
 

Arthurfogo7

Member
OP
Newcomer
Joined
Jul 31, 2022
Messages
23
Trophies
0
Age
22
Location
Brazil
XP
137
Country
Brazil
What is an agent script as it pertains to translation of games? I have never heard the term before and a search does not reveal much.

Anyway two main approaches to debugging Switch games.

1) The Switch itself has an OS running in the background which means you can debug on the Switch itself (obviously needing a hacked one).
https://gbatemp.net/threads/atmospheres-gdb.602435/
Bit slow and a bit clunky compared to whizz bang emulators of older devices but Switch emulation is quite demanding and options there are a bit more limited thus it is very useful for a lot of people.

2) Switch emulation is not as nice as some of the NES, SNES, GBA and DS stuff but it does expose a GDB option
https://yuzu-emu.org/entry/yuzu-progress-report-jun-2022/
GDB (short for GNU debugger) is an approach some emulators take to allow debugging without having to write it all yourself (no easy task and there are not that many ROM hackers, tool assisted speedrunners, homebrew devs and commercial devs needing such things relative to other concerns).
You then attach a third party debugger to the thing; all the big ones like ghidra https://ghidra-sre.org/ ( https://wrongbaud.github.io/posts/ghidra-debugger/ is for the GBA but the principle applies to everything) , radare2 https://book.rada.re/debugger/remote_gdb.html and IDA https://hex-rays.com/ida-pro/ida-debugger/ (IDA is expensive paid for software but the gold standard by which everything else is measured)

All that said does translation need a debugger? 95% of most things being done in translation work without it, and it only becomes necessary when you start doing things like 8 bit encoding conversions, variable width fonts and the like. If the game is heavy on the scripting within the text engine then it can help figure it out but that is something of a rarity as well, and even then for translation purposes unless it is colliding with the encoding conversion or fonts you are less likely to need it.
https://github.com/0xDC00/agent
https://github.com/0xDC00/scripts (this are the script necessary, since it doesn't use ocr, but the game text itself)

Oh, and thank you for the help!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: Yummy yummy :rofl2: