diff --git a/src/cpu/core_full/op.h b/src/cpu/core_full/op.h index bfcb90d..6c1ebc4 100644 --- a/src/cpu/core_full/op.h +++ b/src/cpu/core_full/op.h @@ -584,9 +584,13 @@ switch (inst.code.op) { SETFLAGBIT(CF,(inst_op1_d & (1 << (inst_op2_d & 31)))); inst_op1_d&=~(1 << (inst_op2_d & 31)); break; - case O_BSWAP: + case O_BSWAPw: if (CPU_ArchitectureType>24)|((op1>>8)&0xFF00)|((op1<<8)&0xFF0000)|((op1<<24)&0xFF000000); diff --git a/src/dos/cdrom_image.cpp b/src/dos/cdrom_image.cpp index e85a5e8..f1dd979 100644 --- a/src/dos/cdrom_image.cpp +++ b/src/dos/cdrom_image.cpp @@ -227,11 +227,19 @@ bool CDROM_Interface_Image::GetMediaTrayStatus(bool& mediaPresent, bool& mediaCh bool CDROM_Interface_Image::PlayAudioSector(unsigned long start,unsigned long len) { + // We might want to do some more checks. E.g valid start and length SDL_mutexP(player.mutex); player.cd = this; player.currFrame = start; player.targetFrame = start + len; - player.isPlaying = true; + int track = GetTrack(start) - 1; + if(track >= 0 && tracks[track].attr == 0x40) { + LOG(LOG_MISC,LOG_WARN)("Game tries to play the data track. Not doing this"); + player.isPlaying = false; + //Unclear wether return false should be here. + //specs say that this function returns at once and games should check the status wether the audio is actually playing + //Real drives either fail or succeed as well + } else player.isPlaying = true; player.isPaused = false; SDL_mutexV(player.mutex); return true; @@ -239,6 +247,7 @@ bool CDROM_Interface_Image::PlayAudioSector(unsigned long start,unsigned long le bool CDROM_Interface_Image::PauseAudio(bool resume) { + if (!player.isPlaying) return false; player.isPaused = !resume; return true; } diff --git a/src/dos/cdrom_ioctl_win32.cpp b/src/dos/cdrom_ioctl_win32.cpp index 0f60cfb..60d9d3c 100644 --- a/src/dos/cdrom_ioctl_win32.cpp +++ b/src/dos/cdrom_ioctl_win32.cpp @@ -430,6 +430,7 @@ bool CDROM_Interface_Ioctl::PauseAudio(bool resume) { return false; } if (use_dxplay) { + if (!player.isPlaying) return false; player.isPaused = !resume; return true; } diff --git a/src/hardware/serialport/serialport.cpp b/src/hardware/serialport/serialport.cpp index 16fe4a8..b6a310a 100644 --- a/src/hardware/serialport/serialport.cpp +++ b/src/hardware/serialport/serialport.cpp @@ -1065,6 +1065,7 @@ void CSerial::Init_Registers () { Write_LCR (lcrresult); updateMSR(); Read_MSR(); + PIC_DeActivateIRQ(irq); } CSerial::CSerial(Bitu id, CommandLine* cmd) {