Vastly overhauled the UI, there's now a completely new Settings dialog as well as a status bar with disk activity icons and removable drive menus;

Thoroughly clean up the code to vastly reduce the number of compiler warnings and found and fixed several bugs in the process;
Applied all mainline PCem commits;
Added SCSI hard disk emulation;
Commented out all unfinished machines and graphics cards;
Added the AOpen AP53 and ASUS P/I-P55T2 machines as well as another Tyan 440FX machine, all three with AMI WinBIOS (patch from TheCollector1995);
Added the Diamond Stealth 3D 3000 (S3 ViRGE/VX) graphics card (patch from TheCollector1995);
Added the PS/2 XT IDE (AccuLogic) HDD Controller (patch from TheCollector1995);
Added Microsoft/Logitech Bus Mouse emulation (patch from waltje);
Overhauled the makefiles (patch from waltje);
Added the Adaptec AHA-1542CF SCSI controller (patch from waltje);
Added preliminary (but still unfinished) Adaptec AHA-154x SCSI controller BIOS support (patch from waltje);
Added an ISABugger debugging device (patch from waltje);
Added sanity checks to the Direct3D code.
This commit is contained in:
OBattler
2017-05-05 01:49:42 +02:00
parent d07d53962c
commit f6ef1f833c
346 changed files with 24292 additions and 18058 deletions

View File

@@ -7,23 +7,108 @@
#include "86box.h"
#include "ibm.h"
#include "device.h"
#include "cdrom.h"
#include "scsi.h"
#include "timer.h"
#include "scsi_buslogic.h"
uint8_t SCSIPhase = SCSI_PHASE_BUS_FREE;
uint8_t SCSIStatus = SCSI_STATUS_OK;
uint8_t scsi_cdrom_id = 3; /*common setting*/
uint8_t SCSIPhase = SCSI_PHASE_BUS_FREE;
uint8_t SCSIStatus = SCSI_STATUS_OK;
uint8_t scsi_cdrom_id = 3; /*common setting*/
char scsi_fn[SCSI_NUM][512];
uint16_t scsi_hd_location[SCSI_NUM];
//Initialization function for the SCSI layer
int scsi_card_current = 0;
int scsi_card_last = 0;
typedef struct {
char name[64];
char internal_name[32];
device_t *device;
} SCSI_CARD;
static SCSI_CARD scsi_cards[] = {
{ "None", "none", NULL },
{ "Adaptec AHA-1540B", "aha1540b", &aha1540b_device },
{ "Adaptec AHA-1542CF", "aha1542cf", &aha1542cf_device },
{ "BusLogic BT-542B", "bt542b", &buslogic_device },
{ "BusLogic BT-958D PCI", "bt958d", &buslogic_pci_device },
{ "", "", NULL }
};
int scsi_card_available(int card)
{
if (scsi_cards[card].device)
return(device_available(scsi_cards[card].device));
return(1);
}
char *scsi_card_getname(int card)
{
return(scsi_cards[card].name);
}
device_t *scsi_card_getdevice(int card)
{
return(scsi_cards[card].device);
}
int scsi_card_has_config(int card)
{
if (! scsi_cards[card].device) return(0);
return(scsi_cards[card].device->config ? 1 : 0);
}
char *scsi_card_get_internal_name(int card)
{
return(scsi_cards[card].internal_name);
}
int scsi_card_get_from_internal_name(char *s)
{
int c = 0;
while (strlen(scsi_cards[c].internal_name)) {
if (!strcmp(scsi_cards[c].internal_name, s))
return(c);
c++;
}
return(0);
}
void scsi_card_init()
{
if (scsi_cards[scsi_card_current].device)
device_add(scsi_cards[scsi_card_current].device);
scsi_card_last = scsi_card_current;
}
/* Initialization function for the SCSI layer */
void SCSIReset(uint8_t id, uint8_t lun)
{
uint8_t cdrom_id = scsi_cdrom_drives[id][lun];
uint8_t cdrom_id = scsi_cdrom_drives[id][lun];
uint8_t hdc_id = scsi_hard_disks[id][lun];
if (buslogic_scsi_drive_is_cdrom(id, lun))
if (hdc_id != 0xff) {
scsi_hd_reset(cdrom_id);
SCSIDevices[id][lun].LunType = SCSI_HDD;
} else {
if (cdrom_id != 0xff)
{
cdrom_reset(cdrom_id);
SCSIDevices[id][lun].LunType = SCSI_CDROM;
@@ -32,4 +117,5 @@ void SCSIReset(uint8_t id, uint8_t lun)
{
SCSIDevices[id][lun].LunType = SCSI_NONE;
}
}
}