sync with svn

This commit is contained in:
dborth 2009-10-28 01:55:07 +00:00
parent f0f674830f
commit aafb1122b6
9 changed files with 69 additions and 55 deletions

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* $Id: decoder.h,v 1.58 2009/10/08 20:01:31 c2woody Exp $ */ /* $Id: decoder.h,v 1.59 2009/10/18 17:52:09 c2woody Exp $ */
#define X86_DYNFPU_DH_ENABLED #define X86_DYNFPU_DH_ENABLED
#define X86_INLINED_MEMACCESS #define X86_INLINED_MEMACCESS
@ -2665,7 +2665,8 @@ restart_prefix:
dyn_push(src); dyn_push(src);
break; break;
default: default:
IllegalOption("opcode 0xff"); LOG(LOG_CPU,LOG_ERROR)("CPU:GRP5:Illegal opcode 0xff");
goto illegalopcode;
}} }}
break; break;
default: default:

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* $Id: decoder.h,v 1.7 2009/10/08 20:01:31 c2woody Exp $ */ /* $Id: decoder.h,v 1.8 2009/10/18 17:52:10 c2woody Exp $ */
#include "decoder_basic.h" #include "decoder_basic.h"
@ -566,7 +566,16 @@ restart_prefix:
if (dyn_grp4_eb()) goto finish_block; if (dyn_grp4_eb()) goto finish_block;
break; break;
case 0xff: case 0xff:
if (dyn_grp4_ev()) goto core_close_block; switch (dyn_grp4_ev()) {
case 0:
break;
case 1:
goto core_close_block;
case 2:
goto illegalopcode;
default:
break;
}
break; break;
default: default:

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* $Id: decoder_opcodes.h,v 1.9 2009/06/25 19:31:43 c2woody Exp $ */ /* $Id: decoder_opcodes.h,v 1.10 2009/10/18 17:52:10 c2woody Exp $ */
/* /*
@ -818,7 +818,7 @@ static bool dyn_grp4_eb(void) {
return false; return false;
} }
static bool dyn_grp4_ev(void) { static Bitu dyn_grp4_ev(void) {
dyn_get_modrm(); dyn_get_modrm();
if (decode.modrm.mod<3) { if (decode.modrm.mod<3) {
dyn_fill_ea(FC_ADDR); dyn_fill_ea(FC_ADDR);
@ -848,10 +848,10 @@ static bool dyn_grp4_ev(void) {
gen_restore_addr_reg(); gen_restore_addr_reg();
gen_mov_word_from_reg(FC_ADDR,decode.big_op?(void*)(&reg_eip):(void*)(&reg_ip),decode.big_op); gen_mov_word_from_reg(FC_ADDR,decode.big_op?(void*)(&reg_eip):(void*)(&reg_ip),decode.big_op);
return true; return 1;
case 0x4: // JMP Ev case 0x4: // JMP Ev
gen_mov_word_from_reg(FC_OP1,decode.big_op?(void*)(&reg_eip):(void*)(&reg_ip),decode.big_op); gen_mov_word_from_reg(FC_OP1,decode.big_op?(void*)(&reg_eip):(void*)(&reg_ip),decode.big_op);
return true; return 1;
case 0x3: // CALL Ep case 0x3: // CALL Ep
case 0x5: // JMP Ep case 0x5: // JMP Ep
if (!decode.big_op) gen_extend_word(false,FC_OP1); if (!decode.big_op) gen_extend_word(false,FC_OP1);
@ -865,15 +865,16 @@ static bool dyn_grp4_ev(void) {
gen_restore_reg(FC_OP1,FC_ADDR); gen_restore_reg(FC_OP1,FC_ADDR);
gen_call_function_IRRR(decode.modrm.reg == 3 ? (void*)(&CPU_CALL) : (void*)(&CPU_JMP), gen_call_function_IRRR(decode.modrm.reg == 3 ? (void*)(&CPU_CALL) : (void*)(&CPU_JMP),
decode.big_op,FC_OP2,FC_ADDR,FC_RETOP); decode.big_op,FC_OP2,FC_ADDR,FC_RETOP);
return true; return 1;
case 0x6: // PUSH Ev case 0x6: // PUSH Ev
if (decode.big_op) gen_call_function_raw((void*)&dynrec_push_dword); if (decode.big_op) gen_call_function_raw((void*)&dynrec_push_dword);
else gen_call_function_raw((void*)&dynrec_push_word); else gen_call_function_raw((void*)&dynrec_push_word);
break; break;
default: default:
IllegalOptionDynrec("dyn_grp4_ev"); // IllegalOptionDynrec("dyn_grp4_ev");
return 2;
} }
return false; return 0;
} }

View File

@ -709,8 +709,8 @@
else {GetEAa;Push_32(LoadMd(eaa));} else {GetEAa;Push_32(LoadMd(eaa));}
break; break;
default: default:
E_Exit("CPU:66:GRP5:Illegal call %2X",which); LOG(LOG_CPU,LOG_ERROR)("CPU:66:GRP5:Illegal call %2X",which);
break; goto illegal_opcode;
} }
break; break;
} }

View File

@ -1165,8 +1165,8 @@
else {GetEAa;Push_16(LoadMw(eaa));} else {GetEAa;Push_16(LoadMw(eaa));}
break; break;
default: default:
E_Exit("CPU:GRP5:Illegal Call %2X",which); LOG(LOG_CPU,LOG_ERROR)("CPU:GRP5:Illegal Call %2X",which);
break; goto illegal_opcode;
} }
break; break;
} }

View File

@ -16,7 +16,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* $Id: midi_coreaudio.h,v 1.12 2009/10/18 18:06:28 qbix79 Exp $ */
#include <AudioToolbox/AUGraph.h> #include <AudioToolbox/AUGraph.h>
#include <CoreServices/CoreServices.h>
// A macro to simplify error handling a bit. // A macro to simplify error handling a bit.
#define RequireNoErr(error) \ #define RequireNoErr(error) \

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* $Id: sblaster.cpp,v 1.77 2009/07/11 10:39:38 harekiet Exp $ */ /* $Id: sblaster.cpp,v 1.78 2009/10/25 16:22:22 c2woody Exp $ */
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
@ -250,7 +250,7 @@ static INLINE void SB_RaiseIRQ(SB_IRQS type) {
switch (type) { switch (type) {
case SB_IRQ_8: case SB_IRQ_8:
if (sb.irq.pending_8bit) { if (sb.irq.pending_8bit) {
E_Exit("SB: 8bit irq pending"); // LOG_MSG("SB: 8bit irq pending");
return; return;
} }
sb.irq.pending_8bit=true; sb.irq.pending_8bit=true;
@ -258,7 +258,7 @@ static INLINE void SB_RaiseIRQ(SB_IRQS type) {
break; break;
case SB_IRQ_16: case SB_IRQ_16:
if (sb.irq.pending_16bit) { if (sb.irq.pending_16bit) {
E_Exit("SB: 16bit irq pending"); // LOG_MSG("SB: 16bit irq pending");
return; return;
} }
sb.irq.pending_16bit=true; sb.irq.pending_16bit=true;

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* $Id: int10_char.cpp,v 1.59 2009/07/11 10:25:25 c2woody Exp $ */ /* $Id: int10_char.cpp,v 1.60 2009/10/15 20:36:56 c2woody Exp $ */
/* Character displaying moving functions */ /* Character displaying moving functions */
@ -32,7 +32,7 @@ static void CGA2_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysPt b
PhysPt src=base+((CurMode->twidth*rold)*(cheight/2)+cleft); PhysPt src=base+((CurMode->twidth*rold)*(cheight/2)+cleft);
Bitu copy=(cright-cleft); Bitu copy=(cright-cleft);
Bitu nextline=CurMode->twidth; Bitu nextline=CurMode->twidth;
for (Bitu i=0;i<cheight;i++) { for (Bitu i=0;i<cheight/2U;i++) {
MEM_BlockCopy(dest,src,copy); MEM_BlockCopy(dest,src,copy);
MEM_BlockCopy(dest+8*1024,src+8*1024,copy); MEM_BlockCopy(dest+8*1024,src+8*1024,copy);
dest+=nextline;src+=nextline; dest+=nextline;src+=nextline;
@ -56,7 +56,7 @@ static void TANDY16_CopyRow(Bit8u cleft,Bit8u cright,Bit8u rold,Bit8u rnew,PhysP
PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/4)+cleft)*4; PhysPt dest=base+((CurMode->twidth*rnew)*(cheight/4)+cleft)*4;
PhysPt src=base+((CurMode->twidth*rold)*(cheight/4)+cleft)*4; PhysPt src=base+((CurMode->twidth*rold)*(cheight/4)+cleft)*4;
Bitu copy=(cright-cleft)*4;Bitu nextline=CurMode->twidth*4; Bitu copy=(cright-cleft)*4;Bitu nextline=CurMode->twidth*4;
for (Bitu i=0;i<cheight/2U;i++) { for (Bitu i=0;i<cheight/4U;i++) {
MEM_BlockCopy(dest,src,copy); MEM_BlockCopy(dest,src,copy);
MEM_BlockCopy(dest+8*1024,src+8*1024,copy); MEM_BlockCopy(dest+8*1024,src+8*1024,copy);
MEM_BlockCopy(dest+16*1024,src+16*1024,copy); MEM_BlockCopy(dest+16*1024,src+16*1024,copy);
@ -112,7 +112,7 @@ static void CGA2_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u at
Bitu copy=(cright-cleft); Bitu copy=(cright-cleft);
Bitu nextline=CurMode->twidth; Bitu nextline=CurMode->twidth;
attr=(attr & 0x3) | ((attr & 0x3) << 2) | ((attr & 0x3) << 4) | ((attr & 0x3) << 6); attr=(attr & 0x3) | ((attr & 0x3) << 2) | ((attr & 0x3) << 4) | ((attr & 0x3) << 6);
for (Bitu i=0;i<cheight;i++) { for (Bitu i=0;i<cheight/2U;i++) {
for (Bitu x=0;x<copy;x++) { for (Bitu x=0;x<copy;x++) {
mem_writeb(dest+x,attr); mem_writeb(dest+x,attr);
mem_writeb(dest+8*1024+x,attr); mem_writeb(dest+8*1024+x,attr);
@ -121,7 +121,6 @@ static void CGA2_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u at
} }
} }
static void CGA4_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) { static void CGA4_FillRow(Bit8u cleft,Bit8u cright,Bit8u row,PhysPt base,Bit8u attr) {
Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT); Bit8u cheight = real_readb(BIOSMEM_SEG,BIOSMEM_CHAR_HEIGHT);
PhysPt dest=base+((CurMode->twidth*row)*(cheight/2)+cleft)*2; PhysPt dest=base+((CurMode->twidth*row)*(cheight/2)+cleft)*2;
@ -411,10 +410,10 @@ void ReadCharAttr(Bit16u col,Bit16u row,Bit8u page,Bit16u * result) {
Bit8u bitline=mem_readb(fontdata++); Bit8u bitline=mem_readb(fontdata++);
Bit8u res=0; Bit8u res=0;
Bit8u vidline=0; Bit8u vidline=0;
Bit16u tx=x; Bit16u tx=(Bit16u)x;
while (bitsel) { while (bitsel) {
//Construct bitline in memory //Construct bitline in memory
INT10_GetPixel(tx,y,page,&res); INT10_GetPixel(tx,(Bit16u)y,page,&res);
if(res) vidline|=bitsel; if(res) vidline|=bitsel;
tx++; tx++;
bitsel>>=1; bitsel>>=1;
@ -517,10 +516,10 @@ void WriteChar(Bit16u col,Bit16u row,Bit8u page,Bit8u chr,Bit8u attr,bool useatt
Bit8u bitsel=128; Bit8u bitsel=128;
Bit8u bitline = mem_readb(Real2Phys( fontdata )); Bit8u bitline = mem_readb(Real2Phys( fontdata ));
fontdata = RealMake( RealSeg( fontdata ), RealOff( fontdata ) + 1); fontdata = RealMake( RealSeg( fontdata ), RealOff( fontdata ) + 1);
Bit16u tx=x; Bit16u tx=(Bit16u)x;
while (bitsel) { while (bitsel) {
if (bitline&bitsel) INT10_PutPixel(tx,y,page,attr); if (bitline&bitsel) INT10_PutPixel(tx,(Bit16u)y,page,attr);
else INT10_PutPixel(tx,y,page,attr & xor_mask); else INT10_PutPixel(tx,(Bit16u)y,page,attr & xor_mask);
tx++; tx++;
bitsel>>=1; bitsel>>=1;
} }
@ -594,7 +593,7 @@ static void INT10_TeletypeOutputAttr(Bit8u chr,Bit8u attr,bool useattr,Bit8u pag
if(cur_row==nrows) { if(cur_row==nrows) {
//Fill with black on non-text modes and with 0x7 on textmode //Fill with black on non-text modes and with 0x7 on textmode
Bit8u fill = (CurMode->type == M_TEXT)?0x7:0; Bit8u fill = (CurMode->type == M_TEXT)?0x7:0;
INT10_ScrollWindow(0,0,(Bit8u)(nrows-1),ncols-1,-1,fill,page); INT10_ScrollWindow(0,0,(Bit8u)(nrows-1),(Bit8u)(ncols-1),-1,fill,page);
cur_row--; cur_row--;
} }
// Set the cursor for the page // Set the cursor for the page

View File

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
/* $Id: int10_modes.cpp,v 1.90 2009/09/06 19:25:34 c2woody Exp $ */ /* $Id: int10_modes.cpp,v 1.91 2009/10/19 16:00:22 h-a-l-9000 Exp $ */
#include <string.h> #include <string.h>
@ -607,8 +607,9 @@ bool INT10_SetVideoMode_OTHER(Bit16u mode,bool clearmem) {
RealOff(vparams) + i + crtc_block_index*16) << 8)); RealOff(vparams) + i + crtc_block_index*16) << 8));
if (machine==MCH_CGA) { if (machine==MCH_CGA) {
// mode register // mode register
IO_WriteB(crtc_base + 4, real_readb(RealSeg(vparams), Bit8u mode_control = real_readb(RealSeg(vparams), RealOff(vparams) + 80 + mode);
RealOff(vparams) + 4*16 + 24 + mode)); IO_WriteB(crtc_base + 4, mode_control);
real_writeb(BIOSMEM_SEG,BIOSMEM_CURRENT_MSR, mode_control);
} }
if (machine==MCH_TANDY) { if (machine==MCH_TANDY) {