Properly report MSU-1 revision in the status register

This commit is contained in:
qwertymodo 2017-10-12 15:59:33 -07:00
parent a95d69c051
commit fc224c0df7
2 changed files with 4 additions and 3 deletions

View File

@ -464,7 +464,7 @@ uint8 S9xMSU1ReadPort(uint8 port)
switch (port) switch (port)
{ {
case 0: case 0:
return MSU1.MSU1_STATUS; return MSU1.MSU1_STATUS | MSU1_REVISION;
case 1: case 1:
{ {
if (MSU1.MSU1_STATUS & DataBusy) if (MSU1.MSU1_STATUS & DataBusy)

5
msu1.h
View File

@ -194,6 +194,8 @@
#define _MSU1_H_ #define _MSU1_H_
#include "snes9x.h" #include "snes9x.h"
#define MSU1_REVISION 0x02
struct SMSU1 struct SMSU1
{ {
uint8 MSU1_STATUS; uint8 MSU1_STATUS;
@ -209,8 +211,7 @@ struct SMSU1
}; };
enum SMSU1_FLAG { enum SMSU1_FLAG {
Revision = 0x02, //max: 0x07 Revision = 0x07, // bitmask, not the actual version number
AudioResume = 0x04,
AudioError = 0x08, AudioError = 0x08,
AudioPlaying = 0x10, AudioPlaying = 0x10,
AudioRepeating = 0x20, AudioRepeating = 0x20,