diff options
Diffstat (limited to 'src/system/ps1')
| -rw-r--r-- | src/system/ps1/inc/system/port.h | 17 | ||||
| -rw-r--r-- | src/system/ps1/src/init.c | 32 |
2 files changed, 49 insertions, 0 deletions
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 <stdbool.h> + +#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 <gfx.h> +#include <sfx.h> +#include <system.h> +#include <psx.h> +#include <stdbool.h> + +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) +{ +} |
