radareorg / ideas

4 stars 1 forks source link

Recognise .sym format symbols file #248

Open gingerbeardman opened 6 years ago

gingerbeardman commented 6 years ago

Example file and symbols attached.

This is commonly known as NO$GMB format, and is generated by the commonly used WLA DX dis/assembler.

This format is also used by the Meka and Emulicious emulators.

example.zip

Also see: https://github.com/radareorg/cutter/issues/166

snippet

000 F_BEGIN 0003 F_ALIAS_MAIN 0008 F_DISABLE_INTERRUPTS 000A F_ENABLE_INTERRUPTS 0010 F_SET_VRAM 0028 F_JUMP_HL 002C F_WAIT_UNTIL_VDP_REG_1_EQUALS_1 0038 F_VBLANK_HANDLER 0042 F_BIT_6_CLEAR 0050 F_BIT_6_SET 0066 F_NMI_HANDLER 006F STR_CREDIT_PUBLISHER 008A STR_CREDIT_PROGRAMMER 00A3 F_MAIN 00B9 F_CLEAR_VARS 01BD F_OPTIONS_SAVE 0199 F_LOAD_9400 0220 F_SAVE_HI_SCORES 023C F_OPTIONS_LOAD 0247 F_RET 0248 JT_SAVE_AND_LOAD ...

ps: really impressed you recognise Sega Master System ROMs!

obskyr commented 6 years ago

Make sure this supports files generated by RGBDS too! The syntax is very similar, if not identical. Banks should be supported too.

Example:

; This is a comment.
00:39EC Status_LoadUIGraphics
00:3566 Status_ExpandNumericalTiles
00:12FB Status_DecimalizeStatValue
; Don't forget local labels like these following two:
00:1394 Status_DrawStatValue.hundredsDigitRangeCheck
00:13AA Status_DrawStatValue.tensDigit
00:1338 Status_ModuloDivide
00:1378 Status_DrawStatValue
00:1499 Status_DrawStatValueSmall
00:14B1 Status_DrawStatValuePad3