pokeemerald icon indicating copy to clipboard operation
pokeemerald copied to clipboard

[debug] add support for mgba printf

Open SBird1337 opened this issue 1 year ago • 0 comments

  • adds support for mgba printf debugging as well as adding support for switching between debugging configuration
  • adds mini_printf as an alternative to libc printf as well as switches to choose a pretty printing handler
  • adds a pretty printing format to mini_printf to print preproc encoded strings

Description

The codebase already included support to optionally enable various debugging features (NoCashPrint, AGBPrint) - this PR will add a handler for mgba logs, as well as unify the implementations by adding compile time switches to choose one of them.

Additionally it adds a pretty printing implementation (https://github.com/mludvig/mini-printf) - This is mainly due to the fact that some versions of libc don't like to link against the standard pretty printing implementations (dkp).

It also allows for configurable custom pretty printing formats. This PR includes a format (%S) to print preproc/pokehex formatted strings to the various logs.

Discord contact info

Karathan#1337

SBird1337 avatar Sep 06 '22 11:09 SBird1337