diff options
Diffstat (limited to 'examples/io/system573')
| -rw-r--r-- | examples/io/system573/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | examples/io/system573/iso.xml | 2 | ||||
| -rw-r--r-- | examples/io/system573/main.c | 22 |
3 files changed, 13 insertions, 15 deletions
diff --git a/examples/io/system573/CMakeLists.txt b/examples/io/system573/CMakeLists.txt index 2a362e8..34b0d69 100644 --- a/examples/io/system573/CMakeLists.txt +++ b/examples/io/system573/CMakeLists.txt @@ -1,7 +1,7 @@ # PSn00bSDK example CMake script # (C) 2021 spicyjpeg - MPL licensed -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.21) project( system573 @@ -12,7 +12,7 @@ project( ) file(GLOB _sources *.c *.s) -psn00bsdk_add_executable(system573 STATIC ${_sources}) +psn00bsdk_add_executable(system573 GPREL ${_sources}) psn00bsdk_add_cd_image(system573_iso system573 iso.xml DEPENDS system573) install( diff --git a/examples/io/system573/iso.xml b/examples/io/system573/iso.xml index 0bb84d5..2226089 100644 --- a/examples/io/system573/iso.xml +++ b/examples/io/system573/iso.xml @@ -30,8 +30,6 @@ --> <!--<file name="SYSTEM.CNF" type="data" source="${PROJECT_SOURCE_DIR}/system.cnf" />--> <file name="PSX.EXE" type="data" source="system573.exe" /> - <file name="PSX.MAP" type="data" source="system573.map" /> - <file name="QSY.DXD" type="data" source="system573.exe" /> <file name="SSW.BXF" type="data" source="system573.exe" /> <file name="TSV.AXG" type="data" source="system573.exe" /> diff --git a/examples/io/system573/main.c b/examples/io/system573/main.c index 3404ee4..39ddb64 100644 --- a/examples/io/system573/main.c +++ b/examples/io/system573/main.c @@ -83,17 +83,17 @@ const char *const IO_BOARD_TYPES[] = { #define BGCOLOR_B 0 typedef struct { - DISPENV disp; - DRAWENV draw; -} DB; + DISPENV disp; + DRAWENV draw; +} Framebuffer; typedef struct { - DB db[2]; - uint32_t db_active; -} CONTEXT; + Framebuffer db[2]; + int db_active; +} RenderContext; -void init_context(CONTEXT *ctx) { - DB *db; +void init_context(RenderContext *ctx) { + Framebuffer *db; ResetGraph(0); ctx->db_active = 0; @@ -120,8 +120,8 @@ void init_context(CONTEXT *ctx) { FntOpen(8, 16, 304, 208, 2, 512); } -void display(CONTEXT *ctx) { - DB *db; +void display(RenderContext *ctx) { + Framebuffer *db; DrawSync(0); VSync(0); @@ -135,7 +135,7 @@ void display(CONTEXT *ctx) { /* Main */ -static CONTEXT ctx; +static RenderContext ctx; #define SHOW_STATUS(...) { FntPrint(-1, __VA_ARGS__); FntFlush(-1); display(&ctx); } #define SHOW_ERROR(...) { SHOW_STATUS(__VA_ARGS__); while (1) __asm__("nop"); } |
