Staring at the Mesen-SX debugger without labels imported when you're developing your game can look more like romhacking than game development does in more industry grade IDEs.


I'll show you how to import labels! This tutorial uses libSFX. Grab it here:

For some reason, I have better luck with .dbg files than .sym files.

First find libSFX.make, and add --dbgfile hereitis.dbg to the $(ld) line:

# Link
$(rom) : $(obj_sfx) $(obj_smp_sfx) $(obj) $(obj_smp) $(obj_gsu)
        $(ld) $(ldflags) -C Map.cfg -o $@ $^ --dbgfile hereitis.dbg
        $(sfcheck) $@ -f

hereitis.dbg files will now be generated when you do a 'make' in (some) of the examples. Not all of them generate .dbg files; I don't know why yet. Here are the examples which generate hereitis.dbg for me:

  • MSU-1
  • SixteenMegaPower
  • Template
  • Template-Mode21
  • X-GSU

Now open one of the smc files in Mesen-SX and open the debugger. Navigate to File->Import/Export->Import Labels, then select the .dbg file. If everything worked, you will get a msgbox that says the labels were imported successfully.


Now you can see comments and help keep track of where you are!


Protip: Use Ctrl+Q to switch to source view