• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

help with AGBprint functions

  • 19
    Posts
    5
    Years
    from \include\config.h
    Code:
    #define NDEBUG
    
    // To enable print debugging, comment out "#define NDEBUG". This allows
    // the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
    // Some emulators support a debug console window: uncomment NoCashGBAPrint()
    // and NoCashGBAPrintf() in libisagbprn.c to use no$gba's own proprietary
    // printing system. Use NoCashGBAPrint() and NoCashGBAPrintf() like you
    // would normally use AGBPrint() and AGBPrintf().
    
    // NOTE: Don't try to enable assert right now as many pointers
    // still exist in defines and WILL likely result in a broken ROM.

    Can you enable the other AGBPrint functions without enabling AGBAssert? also, what does assert do? it looks like error handling in it's function definition, but when I see it used in the code it's handling memory (I think).

    the files involved to my knowledge are: \include\config.h & \include\gba\isagbprint.h & \src\libisagbprn.c
    the files where I saw AGBAssert used for memory used is as AGB_ASSERT. if you need to find the calls you can do a ctrl&shift&F (notepad++)

    I'd been banging my head on this for at least 7 hrs yesterday. please help.
     
  • 1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    AGB_ASSERT is similar to the standard assert from assert.h, i.e. it crashes the program if the condition passed to it is false (with a message).

    Anyway, if you don't want to turn AGB_ASSERT on, go change include/gba/isagbprint.h to define it as the NDEBUG version, or perhaps make it a no-op in src/libisagbprn.c.
     
    Back
    Top