regs: add g1_if GDUNLOCK register

This commit is contained in:
Zack Buhman 2024-02-25 13:32:40 +08:00
parent e4c2a047fa
commit c2e596a1c0
4 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#include "gdrom.hpp"
#include "gdrom_bits.hpp"
#include "memorymap.hpp"
#include "systembus.hpp"
#include "sh7091/serial.hpp"
@ -234,7 +235,7 @@ void cd_read()
void main()
{
// gdrom unlock undocumented register
*((volatile unsigned long *)0xa05f74e4) = 0x1fffff;
g1_if.GDUNLOCK = 0x1fffff;
// Without this read from system_boot_rom, the read value of
// gdrom_if.status is always 0xff

View File

@ -83,6 +83,7 @@
"G1_IF","b4","4","G1CRDYC","W","G1IORDY signal control"
"G1_IF","b8","4","GDAPRO","W","GD-DMA address range"
,,,,,
"G1_IF","e4","4","GDUNLOCK","W","(undocumented unlock register)"
"G1_IF","f4","4","GDSTARD","R","GD-DMA address count (on Root Bus)"
"G1_IF","f8","4","GDLEND","R","GD-DMA transfer counter"
,,,,,

1 block address size name r/w description
83 G1_IF b4 4 G1CRDYC W G1IORDY signal control
84 G1_IF b8 4 GDAPRO W GD-DMA address range
85
86 G1_IF e4 4 GDUNLOCK W (undocumented unlock register)
87 G1_IF f4 4 GDSTARD R GD-DMA address count (on Root Bus)
88 G1_IF f8 4 GDLEND R GD-DMA transfer counter
89

Binary file not shown.

View File

@ -142,7 +142,9 @@ struct g1_if_reg {
reg32 G1SYSM; /* System mode */
reg32 G1CRDYC; /* G1IORDY signal control */
reg32 GDAPRO; /* GD-DMA address range */
reg8 _pad5[56];
reg8 _pad5[40];
reg32 GDUNLOCK; /* (undocumented unlock register) */
reg8 _pad6[12];
reg32 GDSTARD; /* GD-DMA address count (on Root Bus) */
reg32 GDLEND; /* GD-DMA transfer counter */
};
@ -163,6 +165,7 @@ static_assert((offsetof (struct g1_if_reg, G1GDWC)) == 0xa4);
static_assert((offsetof (struct g1_if_reg, G1SYSM)) == 0xb0);
static_assert((offsetof (struct g1_if_reg, G1CRDYC)) == 0xb4);
static_assert((offsetof (struct g1_if_reg, GDAPRO)) == 0xb8);
static_assert((offsetof (struct g1_if_reg, GDUNLOCK)) == 0xe4);
static_assert((offsetof (struct g1_if_reg, GDSTARD)) == 0xf4);
static_assert((offsetof (struct g1_if_reg, GDLEND)) == 0xf8);