Skip to content

Commit

Permalink
spu: more status bits
Browse files Browse the repository at this point in the history
  • Loading branch information
notaz committed Mar 25, 2024
1 parent 7f8ea94 commit 0500680
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/dfsound/registers.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val,
break;
//-------------------------------------------------//
case H_SPUctrl:
spu.spuStat = (spu.spuStat & ~0x3f) | (val & 0x3f);
spu.spuStat = (spu.spuStat & ~0xbf) | (val & 0x3f) | ((val << 2) & 0x80);
spu.spuStat &= ~STAT_IRQ | val;
if (!(spu.spuCtrl & CTRL_IRQ)) {
if (val & CTRL_IRQ)
Expand Down
5 changes: 4 additions & 1 deletion plugins/dfsound/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@
#define CTRL_MUTE 0x4000
#define CTRL_ON 0x8000

#define STAT_IRQ 0x40
#define STAT_IRQ 0x0040
#define STAT_DMA_W 0x0100
#define STAT_DMA_R 0x0200
#define STAT_DMA_BUSY 0x0400

///////////////////////////////////////////////////////////

Expand Down
1 change: 1 addition & 0 deletions plugins/dfsound/spu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,7 @@ void do_samples(unsigned int cycles_to, int force_no_thread)

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)
Expand Down

0 comments on commit 0500680

Please sign in to comment.