From 29b7f2b351a54614b77e3fffd391a6ba1740b96e Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Tue, 13 May 2025 03:14:47 -0500 Subject: [PATCH] example: replace all incorrect store queue address masks --- example/bear.cpp | 2 +- example/bsp/katdm3.cpp | 2 +- example/castle.cpp | 2 +- example/dragon.cpp | 2 +- example/elizabeth.cpp | 2 +- example/example.mk | 5 +++++ example/gradient.cpp | 2 +- example/haunted_mansion.cpp | 2 +- example/moai.cpp | 2 +- example/modifier_volume_cube.cpp | 2 +- example/modifier_volume_cube_aa.cpp | 2 +- example/speck.cpp | 2 +- example/testscene.cpp | 2 +- text_editor/text_editor.cpp | 2 +- 14 files changed, 18 insertions(+), 13 deletions(-) diff --git a/example/bear.cpp b/example/bear.cpp index e606024..83ccda1 100644 --- a/example/bear.cpp +++ b/example/bear.cpp @@ -555,7 +555,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/bsp/katdm3.cpp b/example/bsp/katdm3.cpp index 31d8bd5..9bea7ea 100644 --- a/example/bsp/katdm3.cpp +++ b/example/bsp/katdm3.cpp @@ -1179,7 +1179,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/castle.cpp b/example/castle.cpp index c99e08c..91dde10 100644 --- a/example/castle.cpp +++ b/example/castle.cpp @@ -411,7 +411,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, const void * src, int le sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; const uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/dragon.cpp b/example/dragon.cpp index 87e694d..b3b50d1 100644 --- a/example/dragon.cpp +++ b/example/dragon.cpp @@ -567,7 +567,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/elizabeth.cpp b/example/elizabeth.cpp index 98418d5..d929b97 100644 --- a/example/elizabeth.cpp +++ b/example/elizabeth.cpp @@ -275,7 +275,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/example.mk b/example/example.mk index f86b3e9..676965b 100644 --- a/example/example.mk +++ b/example/example.mk @@ -1075,6 +1075,11 @@ MD5_OBJ = \ printf/parse.o \ texture/container/container2.data.o \ texture/container/container2_specular.data.o \ + model/boblamp/guard1_body.data.o \ + model/boblamp/guard1_face.data.o \ + model/boblamp/guard1_helmet.data.o \ + model/boblamp/iron_grill.data.o \ + model/boblamp/round_grill.data.o \ $(LIBGCC) example/md5.elf: LDSCRIPT = $(LIB)/main.lds diff --git a/example/gradient.cpp b/example/gradient.cpp index 7e750b4..3c413e3 100644 --- a/example/gradient.cpp +++ b/example/gradient.cpp @@ -284,7 +284,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, const void * src, int le sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; const uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/haunted_mansion.cpp b/example/haunted_mansion.cpp index f489aeb..881cbb3 100644 --- a/example/haunted_mansion.cpp +++ b/example/haunted_mansion.cpp @@ -714,7 +714,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/moai.cpp b/example/moai.cpp index 9e2077c..8f3580a 100644 --- a/example/moai.cpp +++ b/example/moai.cpp @@ -383,7 +383,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/modifier_volume_cube.cpp b/example/modifier_volume_cube.cpp index d1a7649..f4dccdd 100644 --- a/example/modifier_volume_cube.cpp +++ b/example/modifier_volume_cube.cpp @@ -976,7 +976,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/modifier_volume_cube_aa.cpp b/example/modifier_volume_cube_aa.cpp index dac4e24..b977e24 100644 --- a/example/modifier_volume_cube_aa.cpp +++ b/example/modifier_volume_cube_aa.cpp @@ -976,7 +976,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/speck.cpp b/example/speck.cpp index 048385f..591908c 100644 --- a/example/speck.cpp +++ b/example/speck.cpp @@ -325,7 +325,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/example/testscene.cpp b/example/testscene.cpp index 5a6f3e8..ffff54e 100644 --- a/example/testscene.cpp +++ b/example/testscene.cpp @@ -277,7 +277,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, void * src, int length) sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32 diff --git a/text_editor/text_editor.cpp b/text_editor/text_editor.cpp index 8de97bf..9ba9f61 100644 --- a/text_editor/text_editor.cpp +++ b/text_editor/text_editor.cpp @@ -149,7 +149,7 @@ void transfer_ta_fifo_texture_memory_32byte(void * dst, const void * src, int le sh7091.CCN.QACR0 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); sh7091.CCN.QACR1 = ((reinterpret_cast(out_addr) >> 24) & 0b11100); - volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffc0) / 4]; + volatile uint32_t * base = &store_queue[(out_addr & 0x03ffffe0) / 4]; const uint32_t * src32 = reinterpret_cast(src); length = (length + 31) & ~31; // round up to nearest multiple of 32