diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-11-08 02:34:04 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-11-08 02:34:04 +0100 |
| commit | 8ea8da50d1f01fbbfce9e752d73a9303334555b4 (patch) | |
| tree | 7b57544c376ca8907ccf26a878c2d12e202b50e4 /src/system | |
| parent | 468468633e2b07e39d3edeb169a1924d4c4ce773 (diff) | |
Upload TIM files into VRAM
Diffstat (limited to 'src/system')
| -rw-r--r-- | src/system/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/system/inc/init.h | 15 | ||||
| -rw-r--r-- | src/system/src/init.c | 17 |
3 files changed, 35 insertions, 0 deletions
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 <gfx.h> +#include <psx.h> + +static void vblank(void *const arg) +{ +} + +int system_init(void) +{ + PSX_InitEx(0); + SetVBlankHandler(vblank); + + if (gfx_init()) + return -1; + + return 0; +} |
