break;\r
//-------------------------------------------------//\r
case H_SPUctrl:\r
- spu.spuStat = (spu.spuStat & ~0x3f) | (val & 0x3f);\r
+ spu.spuStat = (spu.spuStat & ~0xbf) | (val & 0x3f) | ((val << 2) & 0x80);\r
spu.spuStat &= ~STAT_IRQ | val;\r
if (!(spu.spuCtrl & CTRL_IRQ)) {\r
if (val & CTRL_IRQ)\r
#define CTRL_MUTE 0x4000\r
#define CTRL_ON 0x8000\r
\r
-#define STAT_IRQ 0x40\r
+#define STAT_IRQ 0x0040\r
+#define STAT_DMA_W 0x0100\r
+#define STAT_DMA_R 0x0200\r
+#define STAT_DMA_BUSY 0x0400\r
\r
///////////////////////////////////////////////////////////\r
\r
spu.cycles_played += ns_to * 768;
spu.decode_pos = (spu.decode_pos + ns_to) & 0x1ff;
+ spu.spuStat = (spu.spuStat & ~0x800) | ((spu.decode_pos << 3) & 0x800);
#if 0
static int ccount; static time_t ctime; ccount++;
if (time(NULL) != ctime)