48# define jo_core_error(...) __jo_core_errorf(__FUNCTION__, __VA_ARGS__)
53# define JO_ENGINE_VERSION (2025.1)
64#ifdef JO_COMPILE_WITH_DUAL_CPU_SUPPORT
105#ifdef JO_COMPILE_WITH_DUAL_CPU_SUPPORT
130#ifdef JO_COMPILE_WITH_DUAL_CPU_SUPPORT
176 jo_smpc_begin_command();
184 jo_smpc_begin_command();
212 (**(void(**)(void))0x600026C)();
220 jo_smpc_begin_command();
229#define jo_core_set_screens_order(screen1, args...) __jo_core_set_screens_order(screen1, ## args, ~0);
305 __asm__
volatile (
"stc sr, %0" :
"=r" (sr));
314 __asm__
volatile (
"ldc %0, sr" : :
"r" (sr) :
"memory");
#define JO_PRINTF_BUF_SIZE
Max character in available in jo_printf().
Definition conf.h:157
void jo_core_suspend(void)
Stop the execution until someone press Start.
static __jo_force_inline void __jo_core_restore_interrupts(const unsigned int sr)
Restore interrupts masked by __jo_core_disable_interrupts() (Internal usage).
Definition core.h:332
void __jo_core_add_slave_job(const jo_slave_job_function function, void *argument)
Add a job to the queue of the slave CPU (Internal usage).
void(*) jo_interrupt_handler(void)
Function prototype for interrupt handlers (Internal usage).
Definition core.h:62
void jo_core_remove_callback(const int event_id)
Remove a callback in the game loop from on main CPU.
void jo_core_init(const jo_color back_color)
Init the engine.
void jo_core_remove_vblank_callback(const int vblank_event_id)
Remove a callback during VBLANK interruption.
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.
void __jo_core_set_interrupt_handler(const unsigned int vector, jo_interrupt_handler handler)
Set an interrupt handler in the vector table (Internal usage).
void(*) jo_event_callback(void)
Function prototype for jo_core_add_callback().
Definition core.h:59
void(*) jo_slave_job_function(void *argument)
Function of a job of the slave CPU (Internal usage).
Definition core.h:154
void __jo_core_synch(void)
Wait for the end of the current frame (Internal usage).
int jo_core_slave_idle_time(void)
Balance of the CPUs in the last frame (between the 2 last calls of jo_core_wait_for_slave()).
int jo_core_add_vblank_callback(const jo_event_callback callback)
Add a callback during VBLANK interruption.
void jo_core_remove_slave_callback(const int event_id)
Remove a callback in the game loop from on slave CPU.
void jo_goto_boot_menu(void)
Return to the boot menu.
static __jo_force_inline void __jo_core_set_sr(const unsigned int sr)
Set CPU status register (Internal usage).
Definition core.h:312
static __jo_force_inline int jo_core_get_refresh_rate(void)
Get the refresh rate of the console.
Definition core.h:200
void noinline
Definition core.h:47
void jo_core_exec_on_slave(jo_slave_callback callback)
Execute a callback on the slave CPU.
static __jo_force_inline void jo_core_exit_to_multiplayer(void)
Exit program and return to the Saturn multiplayer (CD player) screen.
Definition core.h:209
bool __jo_core_is_slave_running(void)
Check if the slave CPU started (Internal usage).
void jo_core_tv_off(void)
Turn OFF scroll drawing processing in the monitor.
static __jo_force_inline void jo_core_disable_reset(void)
Disable reset button.
Definition core.h:174
void jo_core_run(void)
Run the game.
char __jo_last_error[JO_PRINTF_BUF_SIZE]
Error handling (Internal usage).
static __jo_force_inline void jo_core_enable_reset(void)
Enable reset button.
Definition core.h:182
volatile unsigned int __jo_core_vblank_count
Number of VBLANK since startup (Internal usage).
void(*) jo_slave_callback(void)
Function prototype for jo_core_exec_on_slave().
Definition core.h:67
static __jo_force_inline unsigned int __jo_core_get_sr(void)
Get CPU status register (Internal usage).
Definition core.h:301
static __jo_force_inline void jo_core_restart_saturn(void)
Restart the Saturn.
Definition core.h:218
void jo_dump_vdp2_registers(void)
Dump VDP2 registers.
void __jo_core_restore_scu_mask(void)
Write the SCU interrupt mask again at the end of a SCU interrupt handler (Internal usage).
int jo_core_add_callback(const jo_event_callback callback)
Add a callback in the game loop on main CPU.
void jo_core_wait_for_slave(void)
Wait until all the callbacks given to jo_core_exec_on_slave() are completed.
void __jo_core_enable_scu_interrupts(const unsigned int mask)
Unmask SCU interrupts (Internal usage).
void jo_core_tv_on(void)
Turn ON scroll drawing processing in the monitor.
static __jo_force_inline unsigned int __jo_core_disable_interrupts(void)
Mask all interrupts (Internal usage).
Definition core.h:320
void __jo_core_set_screens_order(jo_scroll_screen screen1,...)
Screen order (Internal usage).
void jo_dump_vdp1_registers(void)
Dump VDP1 registers.
void __jo_core_error(char *message, const char *function)
int jo_core_add_slave_callback(const jo_event_callback callback)
Add a callback in the game loop on slave CPU.
void __jo_core_errorf(const char *function, const char *format,...) __attribute__((cold
The message formatted, then __jo_core_error() (Internal usage): one call at each of the hundreds of j...
static __jo_force_inline unsigned int jo_core_get_vblank_count(void)
Get the number of VBLANK since startup (60 per second in NTSC, 50 in PAL).
Definition core.h:271
static __jo_force_inline char * jo_get_last_error(void)
Get last error.
Definition core.h:240
#define JO_VDP2_TVSTAT
Definition sega_saturn.h:169
#define JO_SH2_SR_INTERRUPT_MASK
Status register: interrupt mask bits (level 15 = all interrupts masked).
Definition sega_saturn.h:551
#define JO_VDP2_TVSTAT_PAL
TVSTAT: PAL console (50 Hz).
Definition sega_saturn.h:171
@ DisableReset
Disables NMI requests to be sent when the Reset button is pressed.
Definition smpc.h:78
@ SystemReset
Resets the System.
Definition smpc.h:62
@ EnableReset
Enables NMI requests to be sent when the Reset button is pressed.
Definition smpc.h:76
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition types.h:39
unsigned short jo_color
15 bits color type
Definition types.h:42
jo_scroll_screen
Sega Saturn Scroll Screen Ids.
Definition types.h:322