From 8ea8da50d1f01fbbfce9e752d73a9303334555b4 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 8 Nov 2020 02:34:04 +0100 Subject: Upload TIM files into VRAM --- src/system/CMakeLists.txt | 3 +++ src/system/inc/init.h | 15 +++++++++++++++ src/system/src/init.c | 17 +++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 src/system/CMakeLists.txt create mode 100644 src/system/inc/init.h create mode 100644 src/system/src/init.c (limited to 'src/system') diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt new file mode 100644 index 0000000..5ff8971 --- /dev/null +++ b/src/system/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(init "src/init.c") +target_include_directories(init PUBLIC "inc") +target_link_libraries(init PUBLIC gfx) diff --git a/src/system/inc/init.h b/src/system/inc/init.h new file mode 100644 index 0000000..0560efe --- /dev/null +++ b/src/system/inc/init.h @@ -0,0 +1,15 @@ +#ifndef INIT_H +#define INIT_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +int system_init(void); + +#ifdef __cplusplus +} +#endif + +#endif /* INIT_H */ diff --git a/src/system/src/init.c b/src/system/src/init.c new file mode 100644 index 0000000..97f960a --- /dev/null +++ b/src/system/src/init.c @@ -0,0 +1,17 @@ +#include +#include + +static void vblank(void *const arg) +{ +} + +int system_init(void) +{ + PSX_InitEx(0); + SetVBlankHandler(vblank); + + if (gfx_init()) + return -1; + + return 0; +} -- cgit v1.2.3