From 5f46a967a8b20327648091e6aaf07131935eec1f Mon Sep 17 00:00:00 2001 From: profi200 Date: Wed, 20 Sep 2023 00:24:47 +0200 Subject: [PATCH] Hardcode GPU cmd list sizes in the header instead of 2 places so i don't make *that* mistake again. --- include/arm11/gpu_cmd_lists.h | 6 ++++-- source/arm11/gpu_cmd_lists.c | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/arm11/gpu_cmd_lists.h b/include/arm11/gpu_cmd_lists.h index 9fe6c37..6aea6d9 100644 --- a/include/arm11/gpu_cmd_lists.h +++ b/include/arm11/gpu_cmd_lists.h @@ -22,10 +22,12 @@ #define GPU_RENDER_BUF_ADDR (0x18180000) +#define GBA_INIT_LIST_SIZE (1136) +#define GBA_LIST2_SIZE (448) -extern const u8 gbaGpuInitList[1136]; -extern const u8 gbaGpuList2[448]; +extern u8 gbaGpuInitList[GBA_INIT_LIST_SIZE]; +extern u8 gbaGpuList2[GBA_LIST2_SIZE]; diff --git a/source/arm11/gpu_cmd_lists.c b/source/arm11/gpu_cmd_lists.c index deac080..6640075 100644 --- a/source/arm11/gpu_cmd_lists.c +++ b/source/arm11/gpu_cmd_lists.c @@ -17,11 +17,12 @@ */ #include "types.h" +#include "arm11/gpu_cmd_lists.h" #include "drivers/cache.h" // 360x240 without scaling, no filter. -alignas(16) u8 gbaGpuInitList[1136] = +alignas(16) u8 gbaGpuInitList[GBA_INIT_LIST_SIZE] = { 0x01, 0x00, 0x00, 0x00, 0x10, 0x01, 0x0F, 0x00, 0x00, 0x00, 0x06, 0x03, 0x1C, 0x01, 0x2F, 0x80, 0x00, 0x00, 0x03, 0x03, 0xF0, 0xF0, 0x18, 0x01, @@ -121,7 +122,7 @@ alignas(16) u8 gbaGpuInitList[1136] = }; // 360x240 without scaling, no filter. -alignas(16) u8 gbaGpuList2[448] = +alignas(16) u8 gbaGpuList2[GBA_LIST2_SIZE] = { 0x01, 0x00, 0x00, 0x00, 0x10, 0x01, 0x0F, 0x00, 0x00, 0x00, 0x06, 0x03, 0x1C, 0x01, 0x2F, 0x80, 0x00, 0x00, 0x03, 0x03, 0xF0, 0xF0, 0x18, 0x01,