diff --git a/scsp.h b/scsp.h index 208cc0c..4a9df32 100644 --- a/scsp.h +++ b/scsp.h @@ -90,7 +90,7 @@ typedef struct scsp_ctrl { static_assert((sizeof (struct scsp_ctrl)) == 0x30); static_assert((offsetof (struct scsp_ctrl, STATUS)) == 0x08); -static_assert((offsetof (struct scsp_ctrl, DMEA)) == 0x12); +static_assert((offsetof (struct scsp_ctrl, DMAL)) == 0x12); static_assert((offsetof (struct scsp_ctrl, MCIRE)) == 0x2e); typedef struct scsp_dsp_lh { @@ -154,6 +154,7 @@ extern struct scsp scsp __asm("scsp"); static_assert((sizeof (struct scsp)) == 0x100ee4); static_assert((offsetof (struct scsp, ram)) == 0x000000); static_assert((offsetof (struct scsp, reg)) == 0x100000); +static_assert((sizeof (scsp.reg.dsp.STEP)) == 0x400); // bits @@ -247,7 +248,7 @@ enum mixer_bits { #define PITCH__FNS(n) (((n) & 0x3ff) << 0 ) //}; -enum master_bits { +enum scsp_bits { MIXER__MEM4MB = (1 << 9), MIXER__DAC18B = (1 << 8), #define MIXER__MVOL(n) ((n) << 0) diff --git a/scu.h b/scu.h index 1bd78bb..e426ccc 100644 --- a/scu.h +++ b/scu.h @@ -58,6 +58,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, AIACK)) == 0xA8); +static_assert((offsetof (struct scu_reg, AREF)) == 0xB8); struct scu { scu_reg reg; diff --git a/sh2.lds b/sh2.lds index 81c7085..306ba56 100644 --- a/sh2.lds +++ b/sh2.lds @@ -2,6 +2,7 @@ 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 } @@ -44,3 +45,6 @@ vdp2 = 0x25E00000; scu = 0x25FE0000; sh2_vec = 0x06000000; sh2 = 0xfffffe00; + +work_ram_l = 0x20200000; +work_ram_h = 0x26000000; diff --git a/smpc.h b/smpc.h index 694f8d2..df15caf 100644 --- a/smpc.h +++ b/smpc.h @@ -206,6 +206,8 @@ static_assert((sizeof (smpc_reg)) == 0x80); static_assert((offsetof (struct smpc_reg, oreg.OREG0)) == 0x21); static_assert((offsetof (struct smpc_reg, oreg.OREG1)) == 0x23); static_assert((offsetof (struct smpc_reg, oreg.OREG31)) == 0x5f); +static_assert((offsetof (struct smpc_reg, COMREG)) == 0x1f); +static_assert((offsetof (struct smpc_reg, SR)) == 0x61); static_assert((offsetof (struct smpc_reg, SF)) == 0x63); struct smpc {