From 99a3e94afdfe296f48dd92f50cac62bc394a88c0 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Sun, 31 Mar 2024 15:59:55 +0800 Subject: [PATCH] scu: rename DRAW_END to SPRITE_DRAW_END --- scu.h | 7 ++++--- sh2.lds | 27 ++------------------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/scu.h b/scu.h index 2f2abff..12f61bf 100644 --- a/scu.h +++ b/scu.h @@ -59,6 +59,7 @@ typedef struct scu_reg { static_assert((sizeof (struct scu_reg)) == 0xD0); static_assert((offsetof (struct scu_reg, D1R)) == 0x20); +static_assert((offsetof (struct scu_reg, T1MD)) == 0x98); static_assert((offsetof (struct scu_reg, AIACK)) == 0xA8); static_assert((offsetof (struct scu_reg, AREF)) == 0xB8); @@ -214,7 +215,7 @@ enum pda_bits { enum ims_bits { IMS__A_BUS = (1 << 15), - IMS__DRAW_END = (1 << 13), + IMS__SPRITE_DRAW_END = (1 << 13), IMS__DMA_ILLEGAL = (1 << 12), IMS__DMA0_END = (1 << 11), IMS__DMA1_END = (1 << 10), @@ -248,7 +249,7 @@ enum ist_bits { IST__EXT01 = (1 << 17), IST__EXT00 = (1 << 16), - IST__DRAW_END = (1 << 13), + IST__SPRITE_DRAW_END = (1 << 13), IST__DMA_ILLEGAL = (1 << 12), IST__DMA0_END = (1 << 11), IST__DMA1_END = (1 << 10), @@ -283,7 +284,7 @@ enum scu_vec { SCU_VEC__DMA1_END, SCU_VEC__DMA0_END, SCU_VEC__DMA_ILLEGAL, - SCU_VEC__DRAW_END, + SCU_VEC__SPRITE_DRAW_END, __scu_vec_res0, __scu_vec_res1, SCU_VEC__EXT00, diff --git a/sh2.lds b/sh2.lds index 46f9a8c..f3b01db 100644 --- a/sh2.lds +++ b/sh2.lds @@ -2,7 +2,6 @@ OUTPUT_FORMAT("elf32-sh", "elf32-sh", "elf32-sh") OUTPUT_ARCH(sh) MEMORY { - ipl_rom : ORIGIN = 0x00000000, LENGTH = 512K work_ram_l : ORIGIN = 0x00200000, LENGTH = 1M work_ram_h : ORIGIN = 0x06000000, LENGTH = 1M } @@ -45,29 +44,7 @@ SECTIONS { *(.bss.work_ram_l) } > work_ram_l - - /DISCARD/ : - { - *(.debug*) - *(.comment*) - *(.rela*) - } - - __bss_link_start = ADDR(.bss); - __bss_link_end = ADDR(.bss) + SIZEOF(.bss); - - __ctors_link_start = ADDR(.ctors); - __ctors_link_end = ADDR(.ctors) + SIZEOF(.ctors); } -smpc = 0x20100000; -cdb = 0x25890000; -scsp = 0x25A00000; -vdp1 = 0x25C00000; -vdp2 = 0x25E00000; -scu = 0x25FE0000; -sh2_vec = 0x06000000; -sh2 = 0xfffffe00; - -work_ram_l = 0x20200000; -work_ram_h = 0x26000000; +INCLUDE "symbols.lds" +INCLUDE "addresses.lds"