Add PS/1 XTIDE variant to HDD controller list.
This commit is contained in:
parent
a3ae6a6eed
commit
56b9c33780
6 changed files with 38 additions and 15 deletions
|
|
@ -52,7 +52,8 @@ enum
|
||||||
DEVICE_NOT_WORKING = 1, /*Device does not currently work correctly and will be disabled in a release build*/
|
DEVICE_NOT_WORKING = 1, /*Device does not currently work correctly and will be disabled in a release build*/
|
||||||
DEVICE_AT = 2, /*Device requires an AT-compatible system*/
|
DEVICE_AT = 2, /*Device requires an AT-compatible system*/
|
||||||
DEVICE_MCA = 0x20, /*Device requires an MCA system*/
|
DEVICE_MCA = 0x20, /*Device requires an MCA system*/
|
||||||
DEVICE_PCI = 0x40 /*Device requires a PCI system*/
|
DEVICE_PCI = 0x40, /*Device requires a PCI system*/
|
||||||
|
DEVICE_PS1 = 0x80 /*Device is only for IBM PS/1 Model 2011*/
|
||||||
};
|
};
|
||||||
|
|
||||||
int model_get_config_int(char *s);
|
int model_get_config_int(char *s);
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ static struct
|
||||||
{"[IDE] Standard IDE", "ide", &ide_device, 0, 1},
|
{"[IDE] Standard IDE", "ide", &ide_device, 0, 1},
|
||||||
{"[IDE] XTIDE", "xtide", &xtide_device, 0, 1},
|
{"[IDE] XTIDE", "xtide", &xtide_device, 0, 1},
|
||||||
{"[IDE] XTIDE (AT)", "xtide_at", &xtide_at_device, 0, 1},
|
{"[IDE] XTIDE (AT)", "xtide_at", &xtide_at_device, 0, 1},
|
||||||
|
{"[IDE] XTIDE (PS/1)", "xtide_ps1", &xtide_ps1_device, 0, 1},
|
||||||
{"[SCSI] Adaptec AHA-1542C", "aha1542c", &scsi_aha1542c_device, 0, 0},
|
{"[SCSI] Adaptec AHA-1542C", "aha1542c", &scsi_aha1542c_device, 0, 0},
|
||||||
{"[SCSI] BusLogic BT-545S", "bt545s", &scsi_bt545s_device, 0, 0},
|
{"[SCSI] BusLogic BT-545S", "bt545s", &scsi_bt545s_device, 0, 0},
|
||||||
{"[SCSI] Longshine LCS-6821N", "lcs6821n", &scsi_lcs6821n_device, 0, 0},
|
{"[SCSI] Longshine LCS-6821N", "lcs6821n", &scsi_lcs6821n_device, 0, 0},
|
||||||
|
|
|
||||||
14
src/mem.c
14
src/mem.c
|
|
@ -57,19 +57,6 @@ int cachesize=256;
|
||||||
uint8_t *ram, *rom = NULL;
|
uint8_t *ram, *rom = NULL;
|
||||||
uint8_t romext[32768];
|
uint8_t romext[32768];
|
||||||
|
|
||||||
static void mem_load_atide115_bios()
|
|
||||||
{
|
|
||||||
FILE *f;
|
|
||||||
f=romfopen("ide_at_1_1_5.bin","rb");
|
|
||||||
|
|
||||||
// is486=0;
|
|
||||||
if (f)
|
|
||||||
{
|
|
||||||
fread(romext,16384,1,f);
|
|
||||||
fclose(f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int mem_load_basic(char *path)
|
static int mem_load_basic(char *path)
|
||||||
{
|
{
|
||||||
char s[256];
|
char s[256];
|
||||||
|
|
@ -564,7 +551,6 @@ int loadbios()
|
||||||
fclose(f);
|
fclose(f);
|
||||||
//#endif
|
//#endif
|
||||||
biosmask = 0x1ffff;
|
biosmask = 0x1ffff;
|
||||||
mem_load_atide115_bios();
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case ROM_IBMPS1_2121:
|
case ROM_IBMPS1_2121:
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,12 @@ static void recalc_hdd_list(void* hdlg, int model, int use_selected_hdd, int for
|
||||||
c++;
|
c++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ((((hdd_controller_get_flags(c) & DEVICE_PS1) && models[model].id != ROM_IBMPS1_2011) ||
|
||||||
|
(!(hdd_controller_get_flags(c) & DEVICE_PS1) && models[model].id == ROM_IBMPS1_2011)) && c)
|
||||||
|
{
|
||||||
|
c++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!hdd_controller_available(c))
|
if (!hdd_controller_available(c))
|
||||||
{
|
{
|
||||||
c++;
|
c++;
|
||||||
|
|
|
||||||
28
src/xtide.c
28
src/xtide.c
|
|
@ -90,6 +90,17 @@ static void *xtide_at_init()
|
||||||
return xtide;
|
return xtide;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *xtide_ps1_init()
|
||||||
|
{
|
||||||
|
xtide_t *xtide = malloc(sizeof(xtide_t));
|
||||||
|
memset(xtide, 0, sizeof(xtide_t));
|
||||||
|
|
||||||
|
rom_init(&xtide->bios_rom, "ide_at_1_1_5.bin", 0xc8000, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL);
|
||||||
|
device_add(&ide_device);
|
||||||
|
|
||||||
|
return xtide;
|
||||||
|
}
|
||||||
|
|
||||||
static void xtide_close(void *p)
|
static void xtide_close(void *p)
|
||||||
{
|
{
|
||||||
xtide_t *xtide = (xtide_t *)p;
|
xtide_t *xtide = (xtide_t *)p;
|
||||||
|
|
@ -107,6 +118,11 @@ static int xtide_at_available()
|
||||||
return rom_present("ide_at.bin");
|
return rom_present("ide_at.bin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int xtide_ps1_available()
|
||||||
|
{
|
||||||
|
return rom_present("ide_at_1_1_5.bin");
|
||||||
|
}
|
||||||
|
|
||||||
device_t xtide_device =
|
device_t xtide_device =
|
||||||
{
|
{
|
||||||
"XTIDE",
|
"XTIDE",
|
||||||
|
|
@ -131,3 +147,15 @@ device_t xtide_at_device =
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
device_t xtide_ps1_device =
|
||||||
|
{
|
||||||
|
"XTIDE (PS/1)",
|
||||||
|
DEVICE_PS1,
|
||||||
|
xtide_ps1_init,
|
||||||
|
xtide_close,
|
||||||
|
xtide_ps1_available,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
extern device_t xtide_device;
|
extern device_t xtide_device;
|
||||||
extern device_t xtide_at_device;
|
extern device_t xtide_at_device;
|
||||||
|
extern device_t xtide_ps1_device;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue