bug fixes in drc, audio, display

This commit is contained in:
kub 2020-01-14 22:49:03 +01:00
parent 8ac9ab7fcb
commit b9bc876c9c
14 changed files with 130 additions and 93 deletions

View file

@ -580,7 +580,6 @@ void PicoFrame32x(void)
PicoFrameStart();
PicoFrameHints();
sh2_drc_frame();
elprintf(EL_32X, "poll: %02x %02x %02x",
Pico32x.emu_flags & 3, msh2.state, ssh2.state);

View file

@ -137,11 +137,15 @@ static void dmac_memcpy(struct dma_chan *chan, SH2 *sh2)
if (!up || chan->tcr < 4)
return;
// XXX Mars Check Program fills a 64K buffer, then copies 32K longwords from
// DRAM to SDRAM in 4-longword mode, which is 128K. This overwrites a comm
// area in SDRAM, which is why the check fails.
// Is this a buswidth mismatch problem? As a kludge, usw 16-bit width xfers
if (size == 3 && (chan->sar & 0xdf000000) == 0x04000000) size = 1;
#if MARS_CHECK_HACK
// XXX Mars Check Program copies 32K longwords (128KB) from a 64KB buffer in
// ROM or DRAM to SDRAM in 4-longword mode, overwriting an SDRAM comm area in
// turn, which crashes the test on emulators without CPU cache emulation.
// This may be a bug in Mars Check. As a kludge limit the transfer to 64KB,
// which is what the check program test uses for checking the result.
// A better way would clearly be to have a mechanism to patch the ROM...
if (size == 3 && chan->tcr == 32768 && chan->dar == 0x06020000) size = 1;
#endif
if (size == 3) size = 2; // 4-word xfer mode still counts in words
// XXX check TCR being a multiple of 4 in 4-word xfer mode?
// XXX check alignment of sar/dar, generating a bus error if unaligned?