Merge remote-tracking branch 'upstream/master' into feature/mtrr

This commit is contained in:
Jasmine Iwanek
2022-12-18 15:40:55 -05:00
30 changed files with 194 additions and 129 deletions

0
debian/rules vendored Executable file → Normal file
View File

View File

@@ -430,26 +430,31 @@ cdrom_audio_track_search(cdrom_t *dev, uint32_t pos, int type, uint8_t playbit)
if (dev->cd_status == CD_STATUS_DATA_ONLY)
return 0;
cdrom_log("Audio Track Search: MSF = %06x, type = %02x, playbit = %02x\n", pos, type, playbit);
switch (type) {
case 0x00:
if (pos == 0xffffffff) {
cdrom_log("CD-ROM %i: Search from current position\n", dev->id);
pos = dev->seek_pos;
}
break;
case 0x40:
cdrom_log("Audio Track Search: MSF = %06x, type = %02x\n", pos, type);
m = CD_DCB((pos >> 24) & 0xff);
s = CD_DCB((pos >> 16) & 0xff);
f = CD_DCB((pos >> 8) & 0xff);
pos = MSFtoLBA(m, s, f) - 150;
if (pos == 0xffffffff) {
cdrom_log("CD-ROM %i: Search from current position\n", dev->id);
pos = dev->seek_pos;
} else
pos = MSFtoLBA(m, s, f) - 150;
break;
}
/* Do this at this point, since it's at this point that we know the
actual LBA position to start playing from. */
if (!(dev->ops->track_type(dev, pos) & CD_TRACK_AUDIO)) {
cdrom_log("CD-ROM %i: LBA %08X not on an audio track\n", dev->id, pos);
cdrom_stop(dev);
return 0;
}
/* Unlike standard commands, if there's a data track on an Audio CD (mixed mode)
the playback continues with the audio muted (Toshiba CD-ROM SCSI-2 manual reference). */
dev->seek_pos = pos;
dev->noplay = !playbit;
dev->cd_buflen = 0;
dev->cd_status = playbit ? CD_STATUS_PLAYING : CD_STATUS_PAUSED;
return 1;
}
@@ -462,30 +467,29 @@ cdrom_toshiba_audio_play(cdrom_t *dev, uint32_t pos, int type)
if (dev->cd_status == CD_STATUS_DATA_ONLY)
return 0;
if (dev->cd_status == CD_STATUS_STOPPED || dev->cd_status == CD_STATUS_PAUSED)
dev->cd_status = CD_STATUS_PLAYING;
/*Preliminary support, revert if too incomplete*/
cdrom_log("Toshiba Play Audio: MSF = %06x, cdstatus = %02x\n", pos, dev->cd_status);
switch (type) {
case 0x40:
cdrom_log("Toshiba Play Audio: MSF = %06x, type = %02x\n", pos, type);
m = CD_DCB((pos >> 24) & 0xff);
s = CD_DCB((pos >> 16) & 0xff);
f = CD_DCB((pos >> 8) & 0xff);
pos = MSFtoLBA(m, s, f) - 150;
break;
case 0xc0:
if (pos == 0xffffffff) {
cdrom_log("CD-ROM %i: Playing from current position\n", dev->id);
pos = dev->cd_end;
}
break;
}
/* Do this at this point, since it's at this point that we know the
actual LBA position to start playing from. */
if (!(dev->ops->track_type(dev, pos) & CD_TRACK_AUDIO)) {
cdrom_log("CD-ROM %i: LBA %08X not on an audio track\n", dev->id, pos);
cdrom_stop(dev);
return 0;
}
/* Unlike standard commands, if there's a data track on an Audio CD (mixed mode)
the playback continues with the audio muted (Toshiba CD-ROM SCSI-2 manual reference). */
dev->cd_end = pos;
dev->cd_end = pos;
dev->cd_buflen = 0;
dev->cd_status = CD_STATUS_PLAYING;
return 1;
}
@@ -587,15 +591,12 @@ cdrom_get_current_subcodeq_playstatus(cdrom_t *dev, uint8_t *b)
dev->ops->get_subchannel(dev, dev->seek_pos, &subc);
if (dev->cd_status == CD_STATUS_PLAYING)
ret = 0x00;
else if (dev->cd_status == CD_STATUS_PAUSED) {
if (dev->noplay)
ret = 0x02;
else
ret = 0x01;
} else
cdrom_log("Get Current Subcode-q Play Status = %02x, op = %02x.\n", dev->cd_status, dev->audio_op);
if ((dev->cd_status == CD_STATUS_DATA_ONLY) || (dev->cd_status == CD_STATUS_PLAYING_COMPLETED))
ret = 0x03;
else
ret = (dev->cd_status == CD_STATUS_PLAYING) ? 0x00 : dev->audio_op;
b[0] = subc.attr;
b[1] = CD_BCD(subc.track);
@@ -895,6 +896,7 @@ cdrom_read_disc_info_toc(cdrom_t *dev, unsigned char *b, unsigned char track, in
dev->ops->get_tracks(dev, &first_track, &last_track);
cdrom_log("Read DISC Info TOC Type = %d.\n", type);
switch (type) {
case 0:
b[0] = CD_BCD(first_track);

View File

@@ -254,6 +254,14 @@ ali1533_write(int func, int addr, uint8_t val, void *priv)
dev->pci_conf[addr] = val & 0xcf;
/* This actually enables/disables the USB *device* rather than the interface itself. */
dev->usb_dev_enable = !(val & 0x40);
if (dev->type == 1) {
nvr_at_index_read_handler(0, 0x0070, dev->nvr);
nvr_at_index_read_handler(0, 0x0072, dev->nvr);
if (val & 0x20) {
nvr_at_index_read_handler(1, 0x0070, dev->nvr);
nvr_at_index_read_handler(1, 0x0072, dev->nvr);
}
}
break;
/* Hardware setting status bits, read-only (register 0x54) */

View File

@@ -998,13 +998,13 @@ load_hard_disks(void)
break;
case HDD_BUS_IDE:
max_spt = 63;
max_spt = 255;
max_hpc = 255;
max_tracks = 266305;
break;
case HDD_BUS_SCSI:
max_spt = 99;
max_spt = 255;
max_hpc = 255;
max_tracks = 266305;
break;

View File

@@ -1167,7 +1167,7 @@ cpu_set(void)
if (cpu_s->cpu_type >= CPU_K6_2)
x86_setopcodes(ops_386, ops_k62_0f);
# if defined(DEV_BRANCH) && defined(USE_AMD_K5)
else if (cpu_s->cpu_type = CPU_K6)
else if (cpu_s->cpu_type == CPU_K6)
x86_setopcodes(ops_386, ops_k6_0f);
else
x86_setopcodes(ops_386, ops_pentiummmx_0f);

View File

@@ -334,7 +334,7 @@ int gdbstub_step = 0, gdbstub_next_asap = 0;
uint64_t gdbstub_watch_pages[(((uint32_t) -1) >> (MEM_GRANULARITY_BITS + 6)) + 1];
static void
gdbstub_break()
gdbstub_break(void)
{
/* Pause CPU execution as soon as possible. */
if (gdbstub_step <= GDBSTUB_EXEC)
@@ -988,8 +988,13 @@ e14:
/* Add our supported features to the end. */
if (client->response_pos < (sizeof(client->response) - 1))
#if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64)
client->response_pos += snprintf(&client->response[client->response_pos], sizeof(client->response) - client->response_pos,
"PacketSize=%lX;swbreak+;hwbreak+;qXfer:features:read+", sizeof(client->packet) - 1);
#else
client->response_pos += snprintf(&client->response[client->response_pos], sizeof(client->response) - client->response_pos,
"PacketSize=%X;swbreak+;hwbreak+;qXfer:features:read+", sizeof(client->packet) - 1);
#endif
break;
} else if (!strcmp(client->response, "Xfer")) {
/* Read the transfer object. */
@@ -1627,7 +1632,7 @@ gdbstub_server_thread(void *priv)
}
void
gdbstub_cpu_init()
gdbstub_cpu_init(void)
{
/* Replace cpu_exec with our own function if the GDB stub is active. */
if ((gdbstub_socket != -1) && (cpu_exec != gdbstub_cpu_exec)) {
@@ -1637,7 +1642,7 @@ gdbstub_cpu_init()
}
int
gdbstub_instruction()
gdbstub_instruction(void)
{
/* Check hardware breakpoints if any are present. */
gdbstub_breakpoint_t *breakpoint = first_hwbreak;
@@ -1667,7 +1672,7 @@ gdbstub_instruction()
}
int
gdbstub_int3()
gdbstub_int3(void)
{
/* Check software breakpoints if any are present. */
gdbstub_breakpoint_t *breakpoint = first_swbreak;
@@ -1744,7 +1749,7 @@ gdbstub_mem_access(uint32_t *addrs, int access)
}
void
gdbstub_init()
gdbstub_init(void)
{
#ifdef _WIN32
WSAStartup(MAKEWORD(2, 2), &wsa);
@@ -1790,7 +1795,7 @@ gdbstub_init()
}
void
gdbstub_close()
gdbstub_close(void)
{
/* Stop if the GDB server hasn't initialized. */
if (gdbstub_socket < 0)

View File

@@ -116,7 +116,7 @@ typedef struct cdrom {
seek_diff, cd_end;
int host_drive, prev_host_drive,
cd_buflen, noplay;
cd_buflen, audio_op;
const cdrom_ops_t *ops;

View File

@@ -26,6 +26,7 @@ extern const device_t intel_flash_bxb_device;
extern const device_t sst_flash_29ee010_device;
extern const device_t sst_flash_29ee020_device;
extern const device_t winbond_flash_w29c010_device;
extern const device_t winbond_flash_w29c020_device;
extern const device_t sst_flash_39sf010_device;
extern const device_t sst_flash_39sf020_device;

View File

@@ -53,12 +53,12 @@ enum {
extern int gdbstub_step, gdbstub_next_asap;
extern uint64_t gdbstub_watch_pages[(((uint32_t) -1) >> (MEM_GRANULARITY_BITS + 6)) + 1];
extern void gdbstub_cpu_init();
extern int gdbstub_instruction();
extern int gdbstub_int3();
extern void gdbstub_cpu_init(void);
extern int gdbstub_instruction(void);
extern int gdbstub_int3(void);
extern void gdbstub_mem_access(uint32_t *addrs, int access);
extern void gdbstub_init();
extern void gdbstub_close();
extern void gdbstub_init(void);
extern void gdbstub_close(void);
#else

View File

@@ -683,6 +683,7 @@ extern int machine_at_p6sba_init(const machine_t *);
extern int machine_at_ficka6130_init(const machine_t *);
extern int machine_at_p3v133_init(const machine_t *);
extern int machine_at_p3v4x_init(const machine_t *);
extern int machine_at_gt694va_init(const machine_t *);
extern int machine_at_vei8_init(const machine_t *);
@@ -704,7 +705,6 @@ extern int machine_at_awo671r_init(const machine_t *);
extern int machine_at_63a1_init(const machine_t *);
extern int machine_at_s370sba_init(const machine_t *);
extern int machine_at_apas3_init(const machine_t *);
extern int machine_at_gt694va_init(const machine_t *);
extern int machine_at_cuv4xls_init(const machine_t *);
extern int machine_at_6via90ap_init(const machine_t *);
extern int machine_at_s1857_init(const machine_t *);

View File

@@ -118,6 +118,7 @@ extern void nvr_time_set(struct tm *);
extern void nvr_reg_write(uint16_t reg, uint8_t val, void *priv);
extern void nvr_at_handler(int set, uint16_t base, nvr_t *nvr);
extern void nvr_at_sec_handler(int set, uint16_t base, nvr_t *nvr);
extern void nvr_at_index_read_handler(int set, uint16_t base, nvr_t *nvr);
extern void nvr_read_addr_set(int set, nvr_t *nvr);
extern void nvr_wp_set(int set, int h, nvr_t *nvr);
extern void nvr_via_wp_set(int set, int reg, nvr_t *nvr);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -646,6 +646,48 @@ machine_at_p3v4x_init(const machine_t *model)
return ret;
}
int
machine_at_gt694va_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/gt694va/21071100.bin",
0x000c0000, 262144, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4);
pci_register_slot(0x0D, PCI_CARD_SOUND, 4, 1, 2, 3); /* assumed */
pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
device_add(&via_apro133a_device);
device_add(&via_vt82c596b_device);
device_add(&w83977ef_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(&sst_flash_39sf020_device);
spd_register(SPD_TYPE_SDRAM, 0x7, 1024);
device_add(&w83782d_device); /* fans: CPU, unused, unused; temperatures: System, CPU1, unused */
hwm_values.voltages[1] = 1500; /* IN1 (unknown purpose, assumed Vtt) */
hwm_values.fans[0] = 4500; /* BIOS does not display <4411 RPM */
hwm_values.fans[1] = 0; /* unused */
hwm_values.fans[2] = 0; /* unused */
hwm_values.temperatures[2] = 0; /* unused */
if (sound_card_current == SOUND_INTERNAL) {
device_add(&es1371_onboard_device);
device_add(&cs4297_device); /* assumed */
}
return ret;
}
int
machine_at_vei8_init(const machine_t *model)
{
@@ -765,7 +807,7 @@ machine_at_m729_init(const machine_t *model)
pci_register_slot(0x10, PCI_CARD_NORMAL, 3, 4, 1, 2);
device_add(&ali1621_device);
device_add(&ali1543c_device); /* +0 */
device_add(&sst_flash_29ee010_device);
device_add(&winbond_flash_w29c010_device);
spd_register(SPD_TYPE_SDRAM, 0x7, 512);
return ret;

View File

@@ -344,48 +344,6 @@ machine_at_apas3_init(const machine_t *model)
return ret;
}
int
machine_at_gt694va_init(const machine_t *model)
{
int ret;
ret = bios_load_linear("roms/machines/gt694va/21071100.bin",
0x000c0000, 262144, 0);
if (bios_only || !ret)
return ret;
machine_at_common_init_ex(model, 2);
pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 3, 4);
pci_register_slot(0x0D, PCI_CARD_SOUND, 4, 1, 2, 3); /* assumed */
pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2);
pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1);
pci_register_slot(0x13, PCI_CARD_NORMAL, 1, 2, 3, 4);
pci_register_slot(0x01, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4);
device_add(&via_apro133a_device);
device_add(&via_vt82c596b_device);
device_add(&w83977ef_device);
device_add(&keyboard_ps2_ami_pci_device);
device_add(&sst_flash_39sf020_device);
spd_register(SPD_TYPE_SDRAM, 0x7, 1024);
device_add(&w83782d_device); /* fans: CPU, unused, unused; temperatures: System, CPU1, unused */
hwm_values.voltages[1] = 1500; /* IN1 (unknown purpose, assumed Vtt) */
hwm_values.fans[0] = 4500; /* BIOS does not display <4411 RPM */
hwm_values.fans[1] = 0; /* unused */
hwm_values.fans[2] = 0; /* unused */
hwm_values.temperatures[2] = 0; /* unused */
if (sound_card_current == SOUND_INTERNAL) {
device_add(&es1371_onboard_device);
device_add(&cs4297_device); /* assumed */
}
return ret;
}
int
machine_at_cuv4xls_init(const machine_t *model)
{

View File

@@ -1385,7 +1385,7 @@ machine_ps2_model_60_init(const machine_t *model)
machine_ps2_common_init(model);
ps2.planar_id = 0xf7ff;
ps2.planar_id = 0xfbff;
ps2_mca_board_model_50_init(8);
return ret;
@@ -1405,7 +1405,7 @@ machine_ps2_model_55sx_init(const machine_t *model)
machine_ps2_common_init(model);
ps2.planar_id = 0xfffb;
ps2.planar_id = 0xfbff;
ps2_mca_board_model_55sx_init(0, 4);
return ret;

View File

@@ -10553,7 +10553,7 @@ const machine_t machines[] = {
.max = 1572864,
.step = 8192
},
255,
.nvrmask = 255,
.kbc = KBC_UNKNOWN,
.kbc_p1 = 0,
.gpio = 0,

View File

@@ -77,6 +77,7 @@ static char flash_path[1024];
#define SST39SF040 0xb700
#define WINBOND 0xda /* Winbond Manufacturer's ID */
#define W29C010 0xC100
#define W29C020 0x4500
#define SIZE_512K 0x010000
@@ -482,6 +483,20 @@ const device_t sst_flash_29ee010_device = {
.config = NULL
};
const device_t winbond_flash_w29c010_device = {
.name = "Winbond W29C010 Flash BIOS",
.internal_name = "winbond_flash_w29c010",
.flags = 0,
.local = WINBOND | W29C010 | SIZE_1M,
.init = sst_init,
.close = sst_close,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t sst_flash_29ee020_device = {
.name = "SST 29EE020 Flash BIOS",
.internal_name = "sst_flash_29ee020",

View File

@@ -938,6 +938,23 @@ nvr_at_handler(int set, uint16_t base, nvr_t *nvr)
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
}
void
nvr_at_index_read_handler(int set, uint16_t base, nvr_t *nvr)
{
io_handler(0, base, 1,
NULL, NULL, NULL, nvr_write, NULL, NULL, nvr);
nvr_at_handler(0, base, nvr);
if (set)
nvr_at_handler(1, base, nvr);
else {
io_handler(1, base, 1,
NULL, NULL, NULL, nvr_write, NULL, NULL, nvr);
io_handler(1, base + 1, 1,
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
}
}
void
nvr_at_sec_handler(int set, uint16_t base, nvr_t *nvr)
{
@@ -1043,13 +1060,13 @@ nvr_at_init(const device_t *info)
case 1: /* standard AT */
case 5: /* AMI WinBIOS 1994 */
case 6: /* AMI BIOS 1995 */
if ((info->local & 0x0f) == 1)
if ((info->local & 0x1f) == 0x11)
local->flags |= FLAG_PIIX4;
else {
local->def = 0x00;
if ((info->local & 0x0f) == 5)
if ((info->local & 0x1f) == 0x15)
local->flags |= FLAG_AMI_1994_HACK;
else if ((info->local & 0x0f) == 6)
else if ((info->local & 0x1f) == 0x16)
local->flags |= FLAG_AMI_1995_HACK;
else
local->def = 0xff;
@@ -1125,7 +1142,7 @@ nvr_at_init(const device_t *info)
io_sethandler(0x0070, 2,
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
}
if (info->local & 0x10) {
if (((info->local & 0x1f) == 0x11) || ((info->local & 0x1f) == 0x17)) {
io_sethandler(0x0072, 2,
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
}

View File

@@ -703,13 +703,13 @@ HarddiskDialog::on_comboBoxBus_currentIndexChanged(int index)
max_cylinders = 266305;
break;
case HDD_BUS_IDE:
max_sectors = 63;
max_sectors = 255;
max_heads = 255;
max_cylinders = 266305;
break;
case HDD_BUS_ATAPI:
case HDD_BUS_SCSI:
max_sectors = 99;
max_sectors = 255;
max_heads = 255;
max_cylinders = 266305;
break;

View File

@@ -366,6 +366,10 @@ hdd_count(int bus)
void
MachineStatus::refreshIcons()
{
/* Check if icons should show activity. */
if (!update_icons)
return;
for (size_t i = 0; i < FDD_NUM; ++i) {
d->fdd[i].setActive(machine_status.fdd[i].active);
d->fdd[i].setEmpty(machine_status.fdd[i].empty);
@@ -399,6 +403,23 @@ MachineStatus::refreshIcons()
}
}
void
MachineStatus::clearActivity()
{
for (auto &fdd : d->fdd)
fdd.setActive(false);
for (auto &cdrom : d->cdrom)
cdrom.setActive(false);
for (auto &zip : d->zip)
zip.setActive(false);
for (auto &mo : d->mo)
mo.setActive(false);
for (auto &hdd : d->hdds)
hdd.setActive(false);
for (auto &net : d->net)
net.setActive(false);
}
void
MachineStatus::refresh(QStatusBar *sbar)
{

View File

@@ -70,6 +70,7 @@ public:
static void iterateNIC(const std::function<void(int i)> &cb);
QString getMessage();
void clearActivity();
public slots:
void refresh(QStatusBar *sbar);
void message(const QString &msg);

View File

@@ -2231,6 +2231,9 @@ MainWindow::on_actionUpdate_status_bar_icons_triggered()
{
update_icons ^= 1;
ui->actionUpdate_status_bar_icons->setChecked(update_icons);
/* Prevent icons staying when disabled during activity. */
status->clearActivity();
}
void

View File

@@ -2045,7 +2045,8 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
break;
}
pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5];
ret = cdrom_audio_track_search(dev->drv, pos, cdb[9], cdb[1] & 1);
ret = cdrom_audio_track_search(dev->drv, pos, cdb[9] & 0xc0, cdb[1] & 1);
dev->drv->audio_op = (cdb[1] & 1) ? 0x03 : 0x02;
if (ret)
scsi_cdrom_command_complete(dev);
@@ -2061,7 +2062,7 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
break;
}
pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5];
ret = cdrom_toshiba_audio_play(dev->drv, pos, cdb[9]);
ret = cdrom_toshiba_audio_play(dev->drv, pos, cdb[9] & 0xc0);
if (ret)
scsi_cdrom_command_complete(dev);
@@ -2388,7 +2389,7 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
if (dev->early)
ide_padstr8(dev->buffer + idx, 40, "CD-ROM CDS-431"); /* Product */
else
ide_padstr8(dev->buffer + idx, 40, "XM6201TASUN32XCD1103"); /* Product */
ide_padstr8(dev->buffer + idx, 40, "CD-ROM DRIVE:XM"); /* Product */
} else {
if (dev->early)
ide_padstr8(dev->buffer + idx, 40, "CD-ROM DRIVE:260"); /* Product */
@@ -2399,7 +2400,7 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
}
#endif
idx += 40;
ide_padstr8(dev->buffer + idx, 20, "53R141"); /* Product */
ide_padstr8(dev->buffer + idx, 20, "53R141"); /* Serial */
idx += 20;
break;
@@ -2443,8 +2444,8 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb)
ide_padstr8(dev->buffer + 32, 4, "H42"); /* Revision */
} else {
ide_padstr8(dev->buffer + 8, 8, "TOSHIBA"); /* Vendor */
ide_padstr8(dev->buffer + 16, 16, "XM6201TASUN32XCD"); /* Product */
ide_padstr8(dev->buffer + 32, 4, "1103"); /* Revision */
ide_padstr8(dev->buffer + 16, 16, "CD-ROM DRIVE:XM"); /* Product */
ide_padstr8(dev->buffer + 32, 4, "3433"); /* Revision */
}
} else {
if (dev->early) {
@@ -2492,12 +2493,14 @@ atapi_out:
case GPCMD_PAUSE_RESUME:
scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS);
cdrom_audio_pause_resume(dev->drv, cdb[8] & 0x01);
dev->drv->audio_op = (cdb[8] & 0x01) ? 0x03 : 0x01;
scsi_cdrom_command_complete(dev);
break;
case GPCMD_STILL:
scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS);
dev->drv->cd_status = CD_STATUS_PAUSED;
cdrom_audio_pause_resume(dev->drv, 0x00);
dev->drv->audio_op = 0x01;
scsi_cdrom_command_complete(dev);
break;

View File

@@ -6,7 +6,7 @@
*
* This file is part of the 86Box distribution.
*
* OPTi MediaCHIPS 82C929 (also known as OPTi MAD16 Pro) audio controller emulation.
* OPTi MediaCHIPS 82C929A (also known as OPTi MAD16 Pro) audio controller emulation.
*
*
*
@@ -31,7 +31,6 @@
#include <86box/io.h>
#include <86box/midi.h>
#include <86box/timer.h>
#include <86box/nvr.h>
#include <86box/pic.h>
#include <86box/sound.h>
#include <86box/gameport.h>
@@ -41,7 +40,7 @@
#include <86box/rom.h>
static int optimc_wss_dma[4] = { 0, 0, 1, 3 };
static int optimc_wss_irq[8] = { 5, 7, 9, 10, 11, 12, 14, 15 }; /* W95 only uses 7-10, others may be wrong */
static int optimc_wss_irq[4] = { 7, 9, 10, 11 };
enum optimc_local_flags {
OPTIMC_CS4231 = 0x100,
@@ -68,7 +67,7 @@ typedef struct optimc_t {
sb_t *sb;
uint8_t regs[6];
} optimc_t, opti_82c929_t;
} optimc_t, opti_82c929a_t;
static void
optimc_filter_opl(void* priv, double* out_l, double* out_r)
@@ -102,7 +101,7 @@ optimc_wss_write(uint16_t addr, uint8_t val, void *priv)
return;
optimc->wss_config = val;
ad1848_setdma(&optimc->ad1848, optimc_wss_dma[val & 3]);
ad1848_setirq(&optimc->ad1848, optimc_wss_irq[(val >> 3) & 7]);
ad1848_setirq(&optimc->ad1848, optimc_wss_irq[val & 3]);
}
static void
@@ -334,7 +333,7 @@ optimc_init(const device_t *info)
optimc->cur_wss_addr = 0x530;
optimc->cur_mode = 0;
optimc->cur_addr = 0x220;
optimc->cur_irq = 7;
optimc->cur_irq = 5;
optimc->cur_wss_enabled = 0;
optimc->cur_dma = 1;
optimc->cur_mpu401_irq = 9;
@@ -424,7 +423,7 @@ mirosound_pcm10_available(void)
return rom_present("roms/sound/yamaha/yrw801.rom");
}
static const device_config_t acermagic_s20_config[] = {
static const device_config_t optimc_config[] = {
// clang-format off
{
.name = "receive_input",
@@ -455,7 +454,7 @@ const device_t acermagic_s20_device = {
{ .available = NULL },
.speed_changed = optimc_speed_changed,
.force_redraw = NULL,
.config = acermagic_s20_config
.config = optimc_config
};
const device_t mirosound_pcm10_device = {
@@ -469,5 +468,5 @@ const device_t mirosound_pcm10_device = {
{ .available = mirosound_pcm10_available },
.speed_changed = optimc_speed_changed,
.force_redraw = NULL,
.config = acermagic_s20_config
.config = optimc_config
};

View File

@@ -1239,18 +1239,6 @@ s3_accel_out_fifo(s3_t *s3, uint16_t port, uint8_t val)
s3_accel_start(1, 1, 0xffffffff, s3->accel.pix_trans[0], s3);
}
break;
case 0x200:
if (((s3->accel.multifunc[0xa] & 0xc0) == 0x80) || (s3->accel.cmd & 2)) {
if (((s3->accel.frgd_mix & 0x60) != 0x40) || ((s3->accel.bkgd_mix & 0x60) != 0x40))
s3_accel_start(16, 1, s3->accel.pix_trans[0] | (s3->accel.pix_trans[0] << 8), 0, s3);
else
s3_accel_start(2, 1, 0xffffffff, s3->accel.pix_trans[0] | (s3->accel.pix_trans[0] << 8), s3);
} else {
if (s3->chip != S3_86C928PCI && s3->chip != S3_86C928) {
s3_accel_start(2, 1, 0xffffffff, s3->accel.pix_trans[0] | (s3->accel.pix_trans[0] << 8), s3);
}
}
break;
}
}
break;

View File

@@ -1009,6 +1009,7 @@ END
#undef STR_BUS
#undef STR_CHANNEL
#undef STR_ID
#undef STR_SPEED
#undef STR_SPECIFY
#undef STR_SECTORS

View File

@@ -2793,7 +2793,7 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
add_locations(hdlg);
hdd_ptr->bus = HDD_BUS_IDE;
max_spt = 63;
max_spt = 255;
max_hpc = 255;
settings_set_cur_sel(hdlg, IDC_COMBO_HD_BUS, hdd_ptr->bus - 1);
max_tracks = 266305;
@@ -3315,13 +3315,13 @@ hdd_add_file_open_error:
max_tracks = 266305;
break;
case HDD_BUS_IDE:
max_spt = 63;
max_spt = 255;
max_hpc = 255;
max_tracks = 266305;
break;
case HDD_BUS_ATAPI:
case HDD_BUS_SCSI:
max_spt = 99;
max_spt = 255;
max_hpc = 255;
max_tracks = 266305;
break;