add 32bit writes to some IO ports. fixes #313

This commit is contained in:
Arisotura 2019-06-20 13:57:14 +02:00
parent c4182b5ad3
commit 6d01677a57
1 changed files with 13 additions and 1 deletions

View File

@ -1548,7 +1548,7 @@ void debug(u32 param)
// printf("VRAM %c: %02X\n", 'A'+i, GPU::VRAMCNT[i]);
FILE*
shit = fopen("debug/card.bin", "wb");
shit = fopen("debug/manic.bin", "wb");
for (u32 i = 0x02000000; i < 0x02400000; i+=4)
{
u32 val = ARM7Read32(i);
@ -2819,6 +2819,11 @@ void ARM9IOWrite32(u32 addr, u32 val)
{
switch (addr)
{
case 0x04000004:
GPU::SetDispStat(0, val & 0xFFFF);
GPU::SetVCount(val >> 16);
return;
case 0x04000060: GPU3D::Write32(addr, val); return;
case 0x04000064:
case 0x04000068: GPU::GPU2D_A->Write32(addr, val); return;
@ -3382,6 +3387,11 @@ void ARM7IOWrite32(u32 addr, u32 val)
{
switch (addr)
{
case 0x04000004:
GPU::SetDispStat(1, val & 0xFFFF);
GPU::SetVCount(val >> 16);
return;
case 0x040000B0: DMAs[4]->SrcAddr = val; return;
case 0x040000B4: DMAs[4]->DstAddr = val; return;
case 0x040000B8: DMAs[4]->WriteCnt(val); return;
@ -3465,6 +3475,8 @@ void ARM7IOWrite32(u32 addr, u32 val)
case 0x04000210: IE[1] = val; UpdateIRQ(1); return;
case 0x04000214: IF[1] &= ~val; UpdateIRQ(1); return;
case 0x04000304: PowerControl7 = val & 0xFFFF; return;
case 0x04000308:
if (ARM7BIOSProt == 0)
ARM7BIOSProt = val & 0xFFFE;