Make "quake.elf" work.
Posted on 2005-11-04 00:00:00
Fixed the problem with the Quake logo not showing properly. It was caused by a bug in the DMAC emulation where a write to the D_STAT register with CIMx bits set to 0 would clear the interrupt mask bit. Only CIMx bits set to 1 should change the value of the mask. It was causing the interrupts not to be acknowledged properly upon the receival of a REND SIF command and made the SIF library to run out of SIF packets to call the "read" command of the FILEIO module.

Also fixed the problem with invalid memory accesses I described earlier. The program was being overwritten by GIF DMA transfers, since the GS and EE memory was shared, and that would generate invalid instructions. Seeing that, I concluded that there's was no way the GS would have its memory mapped into the EE address space. The GS has now its own 4MB of memory and all GIF DMA transfers are copied into this memory.

Implemented instruction PSUBW.


Screenshot #000041


It's now getting to the point where it's loading the map and other related files, but it still fails to load properly. I'll be working on that tomorrow.