aica_common: correct sgc definition

This commit is contained in:
Zack Buhman 2025-06-25 15:03:14 -05:00
parent 729ffba90f
commit b51487d374
3 changed files with 4 additions and 4 deletions

View File

@ -263,11 +263,11 @@ struct aica_common {
uint32_t SGC() const
{
return (static_cast<uint32_t>((reg_2810 >> 14) & 0x1) << 0);
return (static_cast<uint32_t>((reg_2810 >> 13) & 0x3) << 0);
}
void SGC(const uint32_t v)
{
reg_2810 = (((v >> 0) & 0x1) << 14) | (reg_2810 & 0xbfff);
reg_2810 = (((v >> 0) & 0x3) << 13) | (reg_2810 & 0x9fff);
}
uint32_t EG() const
@ -714,7 +714,7 @@ namespace aica {
}
namespace lp_sgc_eg {
constexpr uint32_t LP(const uint32_t reg) { return (static_cast<uint32_t>((reg >> 15) & 0x1) << 0); }
constexpr uint32_t SGC(const uint32_t reg) { return (static_cast<uint32_t>((reg >> 14) & 0x1) << 0); }
constexpr uint32_t SGC(const uint32_t reg) { return (static_cast<uint32_t>((reg >> 13) & 0x3) << 0); }
constexpr uint32_t EG(const uint32_t reg) { return (static_cast<uint32_t>((reg >> 0) & 0x1fff) << 0); }
}
namespace ca {

View File

@ -17,7 +17,7 @@
"MSLC",,"0x280c","13-8",,"w"
"MOBUF",,"0x280c","7-0",,"w"
"LP",,"0x2810","15",,"r"
"SGC",,"0x2810","14",,"r"
"SGC",,"0x2810","14-13",,"r"
"EG",,"0x2810","12-0",,"r"
"CA",,"0x2814","15-0",,"r"
"DMEA","0","0x2880","15-9","22-16","w"

1 name part address register_bits argument_bits rw
17 MSLC 0x280c 13-8 w
18 MOBUF 0x280c 7-0 w
19 LP 0x2810 15 r
20 SGC 0x2810 14 14-13 r
21 EG 0x2810 12-0 r
22 CA 0x2814 15-0 r
23 DMEA 0 0x2880 15-9 22-16 w

Binary file not shown.