Jo Engine  9
Jo Sega Saturn Engine
Macros | Typedefs | Functions | Variables
core.h File Reference

Jo Engine core function prototypes. More...

Go to the source code of this file.

Macros

#define jo_core_error(...)
 
#define JO_ENGINE_VERSION
 Jo Engine Version. More...
 

Typedefs

typedef void(* jo_event_callback) (void)
 Function prototype for jo_core_add_callback() More...
 
typedef void(* jo_slave_callback) (void)
 Function prototype for jo_core_exec_on_slave() More...
 

Functions

void __jo_core_error (char *message, const char *function)
 
void jo_core_init (const jo_color back_color)
 Init the engine. More...
 
void jo_core_run (void)
 Run the game. More...
 
void jo_core_suspend (void)
 Stop the execution until someone press Start. More...
 
int jo_core_add_callback (const jo_event_callback callback)
 Add a callback in the game loop on main CPU. More...
 
void jo_core_remove_callback (const int event_id)
 Remove a callback in the game loop from on main CPU. More...
 
int jo_core_add_slave_callback (const jo_event_callback callback)
 Add a callback in the game loop on slave CPU. More...
 
void jo_core_remove_slave_callback (const int event_id)
 Remove a callback in the game loop from on slave CPU. More...
 
void jo_goto_boot_menu (void)
 Return to the boot menu. More...
 
void jo_core_exec_on_slave (jo_slave_callback callback)
 Execute a callback on the slave CPU. More...
 
void jo_core_wait_for_slave (void)
 Wait until slave callback is completed. More...
 
static __jo_force_inline void jo_core_disable_reset (void)
 Disable reset button. More...
 
static __jo_force_inline void jo_core_enable_reset (void)
 Enable reset button. More...
 
static __jo_force_inline char * jo_get_last_error (void)
 Get last error. More...
 
void jo_dump_vdp1_registers (void)
 Dump VDP1 registers. More...
 
void jo_dump_vdp2_registers (void)
 Dump VDP2 registers. More...
 

Variables

char __jo_last_error [JO_PRINTF_BUF_SIZE]
 Error handling (Internal usage) More...
 

Detailed Description

Jo Engine core function prototypes.

Author
Johannes Fetz
Bug:
No known bugs.

Macro Definition Documentation

#define jo_core_error (   ...)
#define JO_ENGINE_VERSION

Jo Engine Version.

Typedef Documentation

typedef void(* jo_event_callback) (void)

Function prototype for jo_core_add_callback()

typedef void(* jo_slave_callback) (void)

Function prototype for jo_core_exec_on_slave()

Function Documentation

void __jo_core_error ( char *  message,
const char *  function 
)
int jo_core_add_callback ( const jo_event_callback  callback)

Add a callback in the game loop on main CPU.

Parameters
callbackFunction name with no parameters and no return value
Warning
Must be called before jo_core_run()
Returns
Event Id (usefull for jo_core_remove_callback())
int jo_core_add_slave_callback ( const jo_event_callback  callback)

Add a callback in the game loop on slave CPU.

Parameters
callbackFunction name with no parameters and no return value
Warning
Must be called before jo_core_run()
Returns
Event Id (usefull for jo_core_remove_callback())
static __jo_force_inline void jo_core_disable_reset ( void  )
static

Disable reset button.

static __jo_force_inline void jo_core_enable_reset ( void  )
static

Enable reset button.

void jo_core_exec_on_slave ( jo_slave_callback  callback)

Execute a callback on the slave CPU.

Parameters
callbackFunction name with no parameters and no return value
void jo_core_init ( const jo_color  back_color)

Init the engine.

Parameters
back_colorDefault background color (colors.h)
Warning
Must be the first function called in jo_main()
void jo_core_remove_callback ( const int  event_id)

Remove a callback in the game loop from on main CPU.

Parameters
event_idValue returned by jo_core_add_callback()
void jo_core_remove_slave_callback ( const int  event_id)

Remove a callback in the game loop from on slave CPU.

Parameters
event_idValue returned by jo_core_add_callback()
void jo_core_run ( void  )

Run the game.

Warning
Must be the last function called in jo_main()
void jo_core_suspend ( void  )

Stop the execution until someone press Start.

void jo_core_wait_for_slave ( void  )

Wait until slave callback is completed.

void jo_dump_vdp1_registers ( void  )

Dump VDP1 registers.

void jo_dump_vdp2_registers ( void  )

Dump VDP2 registers.

static __jo_force_inline char* jo_get_last_error ( void  )
static

Get last error.

Returns
Formated error
void jo_goto_boot_menu ( void  )

Return to the boot menu.

Variable Documentation

char __jo_last_error[JO_PRINTF_BUF_SIZE]

Error handling (Internal usage)

Warning
MC Hammer: don't touch this