Skip to content

Commit

Permalink
Changed audio state version to 2 to accommodate earlier-version state…
Browse files Browse the repository at this point in the history
… file. Changed FAST_SCSI_INTERVAL from 1us to 5us.
  • Loading branch information
captainys committed Jan 4, 2025
1 parent 5a0ecde commit b01aac9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/towns/scsi/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class TownsSCSI : public Device
STATUS_DELAY=500000,
IOTHREAD_WAIT_INTERVAL=100000,

FAST_SCSI_INTERVAL=1000, // 1us.
FAST_SCSI_INTERVAL=5000, // 5us. Changed 1us to 5us on request from BCC. 1us is too fast for Linux, but 5us looks ok.
};

bool fastMode=false;
Expand Down
14 changes: 11 additions & 3 deletions src/towns/sound/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,13 @@ void TownsSound::DeserializeRF5C68(const unsigned char *&data)

/* virtual */ uint32_t TownsSound::SerializeVersion(void) const
{
return 1;
// Version 2: Added audioFlag
return 2;
}
/* virtual */ void TownsSound::SpecificSerialize(std::vector <unsigned char> &data,std::string stateFName) const
{
PushUint32(data,state.muteFlag);
PushUint32(data,state.audioFlag);
PushUint32(data,state.audioFlag); // Version 2
PushUint32(data,state.addrLatch[0]);
PushUint32(data,state.addrLatch[1]);
SerializeYM2612(data);
Expand All @@ -814,7 +815,14 @@ void TownsSound::DeserializeRF5C68(const unsigned char *&data)
/* virtual */ bool TownsSound::SpecificDeserialize(const unsigned char *&data,std::string stateFName,uint32_t version)
{
state.muteFlag=ReadUint32(data);
state.audioFlag=ReadUint32(data);
if(2<=version)
{
state.audioFlag=ReadUint32(data);
}
else
{
state.audioFlag=0x40;
}
state.addrLatch[0]=ReadUint32(data);
state.addrLatch[1]=ReadUint32(data);
DeserializeYM2612(data,version);
Expand Down

0 comments on commit b01aac9

Please sign in to comment.