From 6b9f686913efc3725b2690033cd4f398e07076ba Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 3 Jul 2021 00:49:03 +0200 Subject: Add project source code --- src/system/ps1/inc/system/port.h | 17 +++++++++++++++++ src/system/ps1/src/init.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/system/ps1/inc/system/port.h create mode 100644 src/system/ps1/src/init.c (limited to 'src/system/ps1') diff --git a/src/system/ps1/inc/system/port.h b/src/system/ps1/inc/system/port.h new file mode 100644 index 0000000..395097e --- /dev/null +++ b/src/system/ps1/inc/system/port.h @@ -0,0 +1,17 @@ +#ifndef INIT_PS1_H +#define INIT_PS1_H + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +extern volatile bool vblank_set; + +#ifdef __cplusplus +} +#endif + +#endif /* INIT_PS1_H */ diff --git a/src/system/ps1/src/init.c b/src/system/ps1/src/init.c new file mode 100644 index 0000000..a644e47 --- /dev/null +++ b/src/system/ps1/src/init.c @@ -0,0 +1,32 @@ +#include +#include +#include +#include +#include + +volatile bool vblank_set; + +static void vblank(void *const arg) +{ + vblank_set = true; +} + +void system_deinit(void) +{ + gfx_deinit(); + sfx_deinit(); +} + +int system_init(void) +{ + SetVBlankHandler(vblank); + + if (gfx_init() || sfx_init()) + return -1; + + return 0; +} + +void system_loop(void) +{ +} -- cgit v1.2.3