Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
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... | |
#define | jo_core_set_screens_order(screen1, args...) |
Set scroll screen order between them. 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... | |
int | jo_core_add_vblank_callback (const jo_event_callback callback) |
Add a callback during VBLANK interruption. More... | |
void | jo_core_remove_vblank_callback (const int vblank_event_id) |
Remove a callback during VBLANK interruption. 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_core_set_restart_game_callback (const jo_event_callback callback) |
Add a callback when A+B+C+Start is pressed on the first control pad. 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 void | jo_core_tv_off (void) |
Turn OFF scroll drawing processing in the monitor. More... | |
static __jo_force_inline void | jo_core_tv_on (void) |
Turn ON scroll drawing processing in the monitor. More... | |
static __jo_force_inline void | jo_core_exit_to_multiplayer (void) |
Exit program and return to the Saturn multiplayer (CD player) screen. More... | |
static __jo_force_inline void | jo_core_restart_saturn (void) |
Restart the Saturn. More... | |
void | jo_core_suspend (void) |
Stop the execution until someone press Start. 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... | |
void | __jo_core_set_screens_order (jo_scroll_screen screen1,...) |
Screen order (Internal usage) More... | |
Variables | |
char | __jo_last_error [JO_PRINTF_BUF_SIZE] |
Error handling (Internal usage) More... | |
Jo Engine core function prototypes.
#define jo_core_error | ( | ... | ) |
#define jo_core_set_screens_order | ( | screen1, | |
args... | |||
) |
Set scroll screen order between them.
screen1 | First screen (high priority) |
args | Other screens |
#define JO_ENGINE_VERSION |
Jo Engine Version.
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()
void __jo_core_error | ( | char * | message, |
const char * | function | ||
) |
void __jo_core_set_screens_order | ( | jo_scroll_screen | screen1, |
... | |||
) |
Screen order (Internal usage)
int jo_core_add_callback | ( | const jo_event_callback | callback | ) |
Add a callback in the game loop on main CPU.
callback | Function name with no parameters and no return value |
int jo_core_add_slave_callback | ( | const jo_event_callback | callback | ) |
Add a callback in the game loop on slave CPU.
callback | Function name with no parameters and no return value |
int jo_core_add_vblank_callback | ( | const jo_event_callback | callback | ) |
Add a callback during VBLANK interruption.
callback | Function name with no parameters and no return value |
|
static |
Disable reset button.
|
static |
Enable reset button.
void jo_core_exec_on_slave | ( | jo_slave_callback | callback | ) |
Execute a callback on the slave CPU.
callback | Function name with no parameters and no return value |
|
static |
Exit program and return to the Saturn multiplayer (CD player) screen.
void jo_core_init | ( | const jo_color | back_color | ) |
Init the engine.
back_color | Default background color (colors.h) |
void jo_core_remove_callback | ( | const int | event_id | ) |
Remove a callback in the game loop from on main CPU.
event_id | Value 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.
event_id | Value returned by jo_core_add_slave_callback() |
void jo_core_remove_vblank_callback | ( | const int | vblank_event_id | ) |
Remove a callback during VBLANK interruption.
vblank_event_id | Value returned by jo_core_add_vblank_callback() |
|
static |
Restart the Saturn.
void jo_core_run | ( | void | ) |
Run the game.
void jo_core_set_restart_game_callback | ( | const jo_event_callback | callback | ) |
Add a callback when A+B+C+Start is pressed on the first control pad.
callback | Function name with no parameters and no return value |
void jo_core_suspend | ( | void | ) |
Stop the execution until someone press Start.
|
static |
Turn OFF scroll drawing processing in the monitor.
|
static |
Turn ON scroll drawing processing in the monitor.
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 |
Get last error.
void jo_goto_boot_menu | ( | void | ) |
Return to the boot menu.
char __jo_last_error[JO_PRINTF_BUF_SIZE] |
Error handling (Internal usage)