Applied the recent mainline PCem commits (and fixed the Pentium machines);

Ported the Roland MT-32 emulation (using MUNT) from bit's MT32 emulation branch of PCem;
Sanitized the OpenAL give buffer code in openal.c a bit;
NVR path is now specifiable in the Settings dialog;
Added Logitech 3-button serial mouse per protocol description by waltje;
The RTL8029AS and the BT-958D now actually use the PCI IRQ routing;
Fixed BT-958D PCI device initialization on the bus;
PCI IRQ routing now respects the edge/level setting set on ports 4D0/4D1.
This commit is contained in:
OBattler
2017-06-19 06:46:08 +02:00
parent 9c9f7b1b9a
commit 1e7668f1db
112 changed files with 16289 additions and 732 deletions

View File

@@ -956,6 +956,7 @@ void writeide(int ide_board, uint16_t addr, uint8_t val)
}
idecallback[ide_board]=200*IDE_TIME;
timer_update_outstanding();
ide->do_initial_read = 1;
return;
case WIN_WRITE_MULTIPLE:
@@ -1563,8 +1564,25 @@ void callbackide(int ide_board)
goto id_not_found;
}
hdd_image_read(ide->hdc_num, ide_get_sector(ide), 1, (uint8_t *) ide->buffer);
if (ide->do_initial_read)
{
ide->do_initial_read = 0;
ide->sector_pos = 0;
if (ide->secount)
{
hdd_image_read(ide->hdc_num, ide_get_sector(ide), ide->secount, ide->sector_buffer);
}
else
{
hdd_image_read(ide->hdc_num, ide_get_sector(ide), 256, ide->sector_buffer);
}
}
memcpy(ide->buffer, &ide->sector_buffer[ide->sector_pos*512], 512);
ide->sector_pos++;
ide->pos=0;
ide->atastat = DRQ_STAT | READY_STAT | DSC_STAT;
ide_irq_raise(ide);
@@ -1581,18 +1599,33 @@ void callbackide(int ide_board)
{
goto id_not_found;
}
hdd_image_read(ide->hdc_num, ide_get_sector(ide), 1, (uint8_t *) ide->buffer);
if (ide->do_initial_read)
{
ide->do_initial_read = 0;
ide->sector_pos = 0;
if (ide->secount)
{
hdd_image_read(ide->hdc_num, ide_get_sector(ide), ide->secount, ide->sector_buffer);
}
else
{
hdd_image_read(ide->hdc_num, ide_get_sector(ide), 256, ide->sector_buffer);
}
}
ide->pos=0;
if (ide_bus_master_read)
{
if (ide_bus_master_read(ide_board, (uint8_t *)ide->buffer, 512))
if (ide_bus_master_read(ide_board, &ide->sector_buffer[ide->sector_pos*512], 512))
{
idecallback[ide_board]=6*IDE_TIME; /*DMA not performed, try again later*/
}
else
{
/*DMA successful*/
ide->sector_pos++;
ide->atastat = DRQ_STAT | READY_STAT | DSC_STAT;
ide->secount = (ide->secount - 1) & 0xff;
@@ -1629,8 +1662,25 @@ void callbackide(int ide_board)
goto id_not_found;
}
hdd_image_read(ide->hdc_num, ide_get_sector(ide), 1, (uint8_t *) ide->buffer);
if (ide->do_initial_read)
{
ide->do_initial_read = 0;
ide->sector_pos = 0;
if (ide->secount)
{
hdd_image_read(ide->hdc_num, ide_get_sector(ide), ide->secount, ide->sector_buffer);
}
else
{
hdd_image_read(ide->hdc_num, ide_get_sector(ide), 256, ide->sector_buffer);
}
}
memcpy(ide->buffer, &ide->sector_buffer[ide->sector_pos*512], 512);
ide->sector_pos++;
ide->pos=0;
ide->atastat = DRQ_STAT | READY_STAT | DSC_STAT;
if (!ide->blockcount)
{