fix some gaps in the SPI/cart implementations

This commit is contained in:
Arisotura
2022-03-14 00:27:03 +01:00
parent 89d33fedd2
commit fb7bea06f8
2 changed files with 16 additions and 8 deletions

View File

@ -896,6 +896,8 @@ void WriteCnt(u16 val)
}
}
// TODO: presumably the transfer speed can be changed during a transfer
// like with the NDSCart SPI interface
Cnt = (Cnt & 0x0080) | (val & 0xCF03);
if (val & 0x0400) printf("!! CRAPOED 16BIT SPI MODE\n");
if (Cnt & (1<<7)) printf("!! CHANGING SPICNT DURING TRANSFER: %04X\n", val);
@ -930,8 +932,7 @@ u8 ReadData()
void WriteData(u8 val)
{
if (!(Cnt & (1<<15))) return;
if (Cnt & (1<<7)) printf("!! WRITING AUXSPIDATA DURING PENDING TRANSFER\n");
if (Cnt & (1<<7)) return;
Cnt |= (1<<7);
switch (Cnt & 0x0300)