mirror of
https://github.com/retro100/dosbox-wii.git
synced 2024-12-25 18:11:50 +01:00
sync with svn
This commit is contained in:
parent
336d2c0758
commit
357f2c7bb6
@ -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<CPU_ARCHTYPE_486OLDSLOW) goto illegalopcode;
|
||||
BSWAP(inst_op1_d);
|
||||
BSWAPW(inst_op1_w);
|
||||
break;
|
||||
case O_BSWAPd:
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegalopcode;
|
||||
BSWAPD(inst_op1_d);
|
||||
break;
|
||||
case O_CMPXCHG:
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486NEWSLOW) goto illegalopcode;
|
||||
|
@ -321,10 +321,10 @@ static OpCode OpCodeTable[1024]={
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
/* 0x1c8 - 0x1cf */
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_AX},{L_REGd ,O_BSWAP ,S_REGd ,REGI_CX},
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_DX},{L_REGd ,O_BSWAP ,S_REGd ,REGI_BX},
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_SP},{L_REGd ,O_BSWAP ,S_REGd ,REGI_BP},
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_SI},{L_REGd ,O_BSWAP ,S_REGd ,REGI_DI},
|
||||
{L_REGw ,O_BSWAPw ,S_REGw ,REGI_AX},{L_REGw ,O_BSWAPw ,S_REGw ,REGI_CX},
|
||||
{L_REGw ,O_BSWAPw ,S_REGw ,REGI_DX},{L_REGw ,O_BSWAPw ,S_REGw ,REGI_BX},
|
||||
{L_REGw ,O_BSWAPw ,S_REGw ,REGI_SP},{L_REGw ,O_BSWAPw ,S_REGw ,REGI_BP},
|
||||
{L_REGw ,O_BSWAPw ,S_REGw ,REGI_SI},{L_REGw ,O_BSWAPw ,S_REGw ,REGI_DI},
|
||||
|
||||
/* 0x1d0 - 0x1d7 */
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
@ -677,10 +677,10 @@ static OpCode OpCodeTable[1024]={
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
/* 0x3c8 - 0x3cf */
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_AX},{L_REGd ,O_BSWAP ,S_REGd ,REGI_CX},
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_DX},{L_REGd ,O_BSWAP ,S_REGd ,REGI_BX},
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_SP},{L_REGd ,O_BSWAP ,S_REGd ,REGI_BP},
|
||||
{L_REGd ,O_BSWAP ,S_REGd ,REGI_SI},{L_REGd ,O_BSWAP ,S_REGd ,REGI_DI},
|
||||
{L_REGd ,O_BSWAPd ,S_REGd ,REGI_AX},{L_REGd ,O_BSWAPd ,S_REGd ,REGI_CX},
|
||||
{L_REGd ,O_BSWAPd ,S_REGd ,REGI_DX},{L_REGd ,O_BSWAPd ,S_REGd ,REGI_BX},
|
||||
{L_REGd ,O_BSWAPd ,S_REGd ,REGI_SP},{L_REGd ,O_BSWAPd ,S_REGd ,REGI_BP},
|
||||
{L_REGd ,O_BSWAPd ,S_REGd ,REGI_SI},{L_REGd ,O_BSWAPd ,S_REGd ,REGI_DI},
|
||||
|
||||
/* 0x3d0 - 0x3d7 */
|
||||
{0 ,0 ,0 ,0 },{0 ,0 ,0 ,0 },
|
||||
|
@ -94,7 +94,8 @@ enum {
|
||||
O_BTd,O_BTSd,O_BTRd,O_BTCd,
|
||||
O_BSFw,O_BSRw,O_BSFd,O_BSRd,
|
||||
|
||||
O_BSWAP,O_CMPXCHG,
|
||||
O_BSWAPw, O_BSWAPd,
|
||||
O_CMPXCHG,
|
||||
O_FPU
|
||||
|
||||
|
||||
|
@ -588,28 +588,28 @@
|
||||
else {GetEAa;*rmrw=LoadMw(eaa);SaveMw(eaa,LoadMw(eaa)+oldrmrw);}
|
||||
break;
|
||||
}
|
||||
CASE_0F_B(0xc8) /* BSWAP EAX */
|
||||
CASE_0F_W(0xc8) /* BSWAP AX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_eax);break;
|
||||
CASE_0F_B(0xc9) /* BSWAP ECX */
|
||||
BSWAPW(reg_ax);break;
|
||||
CASE_0F_W(0xc9) /* BSWAP CX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_ecx);break;
|
||||
CASE_0F_B(0xca) /* BSWAP EDX */
|
||||
BSWAPW(reg_cx);break;
|
||||
CASE_0F_W(0xca) /* BSWAP DX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_edx);break;
|
||||
CASE_0F_B(0xcb) /* BSWAP EBX */
|
||||
BSWAPW(reg_dx);break;
|
||||
CASE_0F_W(0xcb) /* BSWAP BX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_ebx);break;
|
||||
CASE_0F_B(0xcc) /* BSWAP ESP */
|
||||
BSWAPW(reg_bx);break;
|
||||
CASE_0F_W(0xcc) /* BSWAP SP */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_esp);break;
|
||||
CASE_0F_B(0xcd) /* BSWAP EBP */
|
||||
BSWAPW(reg_sp);break;
|
||||
CASE_0F_W(0xcd) /* BSWAP BP */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_ebp);break;
|
||||
CASE_0F_B(0xce) /* BSWAP ESI */
|
||||
BSWAPW(reg_bp);break;
|
||||
CASE_0F_W(0xce) /* BSWAP SI */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_esi);break;
|
||||
CASE_0F_B(0xcf) /* BSWAP EDI */
|
||||
BSWAPW(reg_si);break;
|
||||
CASE_0F_W(0xcf) /* BSWAP DI */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAP(reg_edi);break;
|
||||
BSWAPW(reg_di);break;
|
||||
|
||||
|
@ -439,3 +439,27 @@
|
||||
else {GetEAa;*rmrd=LoadMd(eaa);SaveMd(eaa,LoadMd(eaa)+oldrmrd);}
|
||||
break;
|
||||
}
|
||||
CASE_0F_D(0xc8) /* BSWAP EAX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_eax);break;
|
||||
CASE_0F_D(0xc9) /* BSWAP ECX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_ecx);break;
|
||||
CASE_0F_D(0xca) /* BSWAP EDX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_edx);break;
|
||||
CASE_0F_D(0xcb) /* BSWAP EBX */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_ebx);break;
|
||||
CASE_0F_D(0xcc) /* BSWAP ESP */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_esp);break;
|
||||
CASE_0F_D(0xcd) /* BSWAP EBP */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_ebp);break;
|
||||
CASE_0F_D(0xce) /* BSWAP ESI */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_esi);break;
|
||||
CASE_0F_D(0xcf) /* BSWAP EDI */
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_486OLDSLOW) goto illegal_opcode;
|
||||
BSWAPD(reg_edi);break;
|
||||
|
@ -956,5 +956,8 @@
|
||||
save(op1,lf_resd); \
|
||||
lflags.type=t_DSHRd;
|
||||
|
||||
#define BSWAP(op1) \
|
||||
#define BSWAPW(op1) \
|
||||
op1 = 0;
|
||||
|
||||
#define BSWAPD(op1) \
|
||||
op1 = (op1>>24)|((op1>>8)&0xFF00)|((op1<<8)&0xFF0000)|((op1<<24)&0xFF000000);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1065,6 +1065,7 @@ void CSerial::Init_Registers () {
|
||||
Write_LCR (lcrresult);
|
||||
updateMSR();
|
||||
Read_MSR();
|
||||
PIC_DeActivateIRQ(irq);
|
||||
}
|
||||
|
||||
CSerial::CSerial(Bitu id, CommandLine* cmd) {
|
||||
|
Loading…
Reference in New Issue
Block a user