mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 03:41:10 +08:00
cleanup
This commit is contained in:
parent
b9f28d1b93
commit
16929fa921
@ -863,7 +863,7 @@ nochange:
|
||||
|
||||
static void gen_sop_word_imm(ShiftOps op,bool dword,DynReg * dr1,uint8_t imm) {
|
||||
uint8_t tmp=0xC1;
|
||||
int dst = FindDynReg(dr1,dword && op==DOP_MOV)->index;
|
||||
int dst = FindDynReg(dr1,dword && (unsigned int)op==(unsigned int)DOP_MOV)->index;
|
||||
opcode i;
|
||||
i.setimm(imm, 1);
|
||||
|
||||
|
@ -173,8 +173,6 @@ Bits CPU_Core_KVM_Run(void) {
|
||||
if (CPU_Cycles <= 0)
|
||||
return CBRET_NONE;
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
while (CPU_Cycles-->0) {
|
||||
LOADIP;
|
||||
last_prefix=MP_NONE;
|
||||
@ -227,9 +225,6 @@ restart_opcode:
|
||||
}
|
||||
SAVEIP;
|
||||
}
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
decode_end:
|
||||
SAVEIP;
|
||||
FillFlags();
|
||||
|
@ -157,8 +157,6 @@ Bits CPU_Core_Normal_Run(void) {
|
||||
if (CPU_Cycles <= 0)
|
||||
return CBRET_NONE;
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
while (CPU_Cycles-->0) {
|
||||
LOADIP;
|
||||
last_prefix=MP_NONE;
|
||||
@ -211,9 +209,6 @@ restart_opcode:
|
||||
}
|
||||
SAVEIP;
|
||||
}
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
decode_end:
|
||||
SAVEIP;
|
||||
FillFlags();
|
||||
|
@ -175,8 +175,6 @@ Bits CPU_Core286_Normal_Run(void) {
|
||||
if (CPU_Cycles <= 0)
|
||||
return CBRET_NONE;
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
while (CPU_Cycles-->0) {
|
||||
LOADIP;
|
||||
core.prefixes=0;
|
||||
@ -225,9 +223,6 @@ restart_opcode:
|
||||
}
|
||||
SAVEIP;
|
||||
}
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
/* 8086/286 multiple prefix interrupt bug emulation.
|
||||
* If an instruction is interrupted, only the last prefix is restarted.
|
||||
* See also [https://www.pcjs.org/pubs/pc/reference/intel/8086/] and [https://www.youtube.com/watch?v=6FC-tcwMBnU] */
|
||||
|
@ -185,8 +185,6 @@ Bits CPU_Core8086_Normal_Run(void) {
|
||||
if (CPU_Cycles <= 0)
|
||||
return CBRET_NONE;
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
while (CPU_Cycles-->0) {
|
||||
LOADIP;
|
||||
core.prefixes=0;
|
||||
@ -245,7 +243,6 @@ prefix_out:
|
||||
return CBRET_NONE;
|
||||
decode_end:
|
||||
SAVEIP;
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
}
|
||||
|
@ -183,8 +183,6 @@ Bits CPU_Core_Prefetch_Run(void) {
|
||||
if (CPU_Cycles <= 0)
|
||||
return CBRET_NONE;
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
// FIXME: This makes 8086 4-byte prefetch queue impossible to emulate.
|
||||
// The best way to accomplish this is to have an alternate version
|
||||
// of this prefetch queue for 286 or lower that fetches in 16-bit
|
||||
@ -285,9 +283,6 @@ restart_opcode:
|
||||
}
|
||||
#endif
|
||||
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
decode_end:
|
||||
SAVEIP;
|
||||
FillFlags();
|
||||
|
@ -200,8 +200,6 @@ Bits CPU_Core286_Prefetch_Run(void) {
|
||||
if (CPU_Cycles <= 0)
|
||||
return CBRET_NONE;
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
pq_limit = (max(CPU_PrefetchQueueSize,(unsigned int)(4ul + prefetch_unit)) + prefetch_unit - 1ul) & (~(prefetch_unit-1ul));
|
||||
pq_reload = min(pq_limit,(Bitu)8u);
|
||||
|
||||
@ -306,7 +304,6 @@ prefix_out:
|
||||
return CBRET_NONE;
|
||||
decode_end:
|
||||
SAVEIP;
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
}
|
||||
|
@ -211,8 +211,6 @@ Bits CPU_Core8086_Prefetch_Run(void) {
|
||||
if (CPU_Cycles <= 0)
|
||||
return CBRET_NONE;
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
pq_limit = (max(CPU_PrefetchQueueSize,(unsigned int)(4ul + prefetch_unit)) + prefetch_unit - 1ul) & (~(prefetch_unit-1ul));
|
||||
pq_reload = min(pq_limit,(Bitu)8u);
|
||||
|
||||
@ -317,7 +315,6 @@ prefix_out:
|
||||
return CBRET_NONE;
|
||||
decode_end:
|
||||
SAVEIP;
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
}
|
||||
|
@ -168,8 +168,6 @@ Bits CPU_Core_Simple_Run(void) {
|
||||
if (paging.enabled)
|
||||
return CPU_Core_Normal_Run();
|
||||
|
||||
const Bitu init_cycles = CPU_Cycles;
|
||||
|
||||
safety_limit = (HostPt)((size_t)MemBase + ((size_t)MEM_TotalPages() * (size_t)4096) - (size_t)16384); /* safety margin */
|
||||
|
||||
LOADIP;
|
||||
@ -215,9 +213,6 @@ restart_opcode:
|
||||
}
|
||||
SAVEIP;
|
||||
}
|
||||
decode_stop_at_instruction:
|
||||
FillFlags();
|
||||
return CBRET_NONE;
|
||||
decode_end:
|
||||
SAVEIP;
|
||||
FillFlags();
|
||||
|
@ -217,6 +217,7 @@ static void LogEMUMachine(void) {
|
||||
case SVGA_TsengET4K: cardName ="Tseng ET4000"; break;
|
||||
case SVGA_TsengET3K: cardName ="Tseng ET3000"; break;
|
||||
case SVGA_ParadisePVGA1A: cardName ="Paradise PVGA1A"; break;
|
||||
case SVGA_ATI: cardName ="ATI"; break;
|
||||
}
|
||||
|
||||
DEBUG_ShowMsg("Machine: %s %s",m, cardName);
|
||||
|
@ -298,6 +298,8 @@ void Set_Label(char const * const input, char * const output, bool cdrom) {
|
||||
strncpy(upcasebuf, input, 11);
|
||||
//DBCS_upcase(upcasebuf); /* Another mscdex quirk. Label is not always uppercase. (Daggerfall) */
|
||||
|
||||
(void)cdrom;
|
||||
|
||||
while (togo > 0) {
|
||||
if(upcasebuf[vnamePos] == 0) str_end = true;
|
||||
output[labelPos] = !str_end ? upcasebuf[vnamePos] : 0x0; // Pad empty characters with 0x00
|
||||
|
Loading…
x
Reference in New Issue
Block a user