Removed a bunch of old #defines. Cleaned up some dead code.

This commit is contained in:
TomW 2015-09-16 19:08:50 +01:00
commit 1e45ba5f34
5 changed files with 17 additions and 24 deletions

View file

@ -67,6 +67,8 @@ int cpu_use_dynarec;
uint64_t cpu_CR4_mask;
int is386;
uint64_t tsc = 0;
int timing_rr;
@ -348,6 +350,7 @@ void cpu_set()
CPUID = cpu_s->cpuid_model;
cpuspeed = cpu_s->speed;
is8086 = (cpu_s->cpu_type >= CPU_8088);
is386 = (cpu_s->cpu_type >= CPU_386SX);
is486 = (cpu_s->cpu_type >= CPU_i486SX) || (cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_486DLC);
hasfpu = (cpu_s->cpu_type >= CPU_i486DX);
cpu_iscyrix = (cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_486DLC || cpu_s->cpu_type == CPU_Cx486S || cpu_s->cpu_type == CPU_Cx486DX || cpu_s->cpu_type == CPU_Cx5x86);

View file

@ -269,28 +269,13 @@ int disctime;
char discfns[2][256];
int driveempty[2];
/*Config stuff*/
#define MDA ((gfxcard==GFX_MDA || gfxcard==GFX_HERCULES) && (romset<ROM_TANDY || romset>=ROM_IBMAT))
#define HERCULES (gfxcard==GFX_HERCULES && (romset<ROM_TANDY || romset>=ROM_IBMAT))
#define AMSTRAD (romset==ROM_PC1512 || romset==ROM_PC1640 || romset==ROM_PC3086)
#define AMSTRADIO (romset==ROM_PC1512 || romset==ROM_PC1640 || romset==ROM_PC200 || romset==ROM_PC2086 || romset == ROM_PC3086)
#define TANDY (romset==ROM_TANDY/* || romset==ROM_IBMPCJR*/)
#define VID_EGA (gfxcard==GFX_EGA)
#define EGA (romset==ROM_PC1640 || VID_EGA || VGA)
#define VGA ((gfxcard>=GFX_TVGA || romset==ROM_ACER386) && romset!=ROM_PC1640 && romset!=ROM_PC1512 && romset!=ROM_TANDY && romset!=ROM_PC200)
#define SVGA (gfxcard==GFX_ET4000 && VGA)
#define TRIDENT (gfxcard==GFX_TVGA && !OTI067)
#define OTI067 (romset==ROM_ACER386)
#define ET4000 (gfxcard==GFX_ET4000 && VGA)
#define ET4000W32 (gfxcard==GFX_ET4000W32 && VGA)
#define AT (romset>=ROM_IBMAT)
#define PCI (romset >= ROM_PCI486 && romset < ROM_IBMPS1_2011)
#define PCJR (romset == ROM_IBMPCJR)
#define AMIBIOS (romset==ROM_AMI386 || romset==ROM_AMI486 || romset == ROM_WIN486)
int GAMEBLASTER, GUS, SSI2001, voodoo_enabled;
extern int AMSTRAD, AT, is386, PCI, TANDY;
enum
{
@ -338,10 +323,6 @@ enum
extern int romspresent[ROM_MAX];
//#define ROM_IBMPCJR 5 /*Not working! ROMs are corrupt*/
#define is386 (romset>=ROM_IBMAT386)
#define is386sx 0
int hasfpu;
int romset;

View file

@ -67,6 +67,8 @@ void at_endeavor_init();
int model;
int AMSTRAD, AT, PCI, TANDY;
MODEL models[] =
{
{"IBM PC", ROM_IBMPC, { "", cpus_8088, "", NULL, "", NULL}, 0, xt_init},
@ -173,6 +175,7 @@ void pcjr_init()
void tandy1k_init()
{
TANDY = 1;
common_init();
keyboard_xt_init();
mouse_serial_init();
@ -183,6 +186,7 @@ void tandy1k_init()
void ams_init()
{
AMSTRAD = 1;
common_init();
amstrad_init();
keyboard_amstrad_init();
@ -223,6 +227,7 @@ void at_init()
mouse_serial_init();
nvr_init();
pic2_init();
AT = 1;
}
void deskpro386_init()
@ -234,6 +239,7 @@ void deskpro386_init()
void ps1_init()
{
AT = 1;
common_init();
pit_set_out_func(1, pit_refresh_timer_at);
dma16_init();
@ -331,6 +337,7 @@ void at_i430vx_init()
void model_init()
{
pclog("Initting as %s\n", model_getname());
AMSTRAD = AT = PCI = TANDY = 0;
io_init();
models[model].init();

View file

@ -120,6 +120,8 @@ void pci_init(int type, int min_card, int max_card)
{
int c;
PCI = 1;
if (type == PCI_CONFIG_TYPE_1)
{
io_sethandler(0x0cf8, 0x0001, NULL, NULL, pci_cf8_read, NULL, NULL, pci_cf8_write, NULL);

View file

@ -90,7 +90,7 @@ void serial_write(uint16_t addr, uint8_t val, void *p)
switch (addr&7)
{
case 0:
if (serial->lcr & 0x80 && !AMSTRADIO)
if (serial->lcr & 0x80)
{
serial->dlab1 = val;
return;
@ -105,7 +105,7 @@ void serial_write(uint16_t addr, uint8_t val, void *p)
}
break;
case 1:
if (serial->lcr & 0x80 && !AMSTRADIO)
if (serial->lcr & 0x80)
{
serial->dlab2 = val;
return;
@ -174,7 +174,7 @@ uint8_t serial_read(uint16_t addr, void *p)
switch (addr&7)
{
case 0:
if (serial->lcr & 0x80 && !AMSTRADIO)
if (serial->lcr & 0x80)
{
temp = serial->dlab1;
break;
@ -188,7 +188,7 @@ uint8_t serial_read(uint16_t addr, void *p)
serial->recieve_delay = 1000 * TIMER_USEC;
break;
case 1:
if (serial->lcr & 0x80 && !AMSTRADIO)
if (serial->lcr & 0x80)
temp = serial->dlab2;
else
temp = serial->ier;