mirror of
https://github.com/holub/mame
synced 2025-05-30 17:41:47 +03:00
atapicdr: unbreak firebeat (nw)
ins8250: reassert thre irq when setting mask (nw)
This commit is contained in:
parent
c936278b52
commit
3708c7a37e
@ -8,6 +8,7 @@
|
||||
|
||||
// device type definition
|
||||
const device_type ATAPI_CDROM = &device_creator<atapi_cdrom_device>;
|
||||
const device_type ATAPI_FIXED_CDROM = &device_creator<atapi_fixed_cdrom_device>;
|
||||
|
||||
atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
atapi_hle_device(mconfig, ATAPI_CDROM, "ATAPI CDROM", tag, owner, clock, "cdrom", __FILE__)
|
||||
@ -19,6 +20,11 @@ atapi_cdrom_device::atapi_cdrom_device(const machine_config &mconfig, device_typ
|
||||
{
|
||||
}
|
||||
|
||||
atapi_fixed_cdrom_device::atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
atapi_cdrom_device(mconfig, ATAPI_FIXED_CDROM, "ATAPI fixed CDROM", tag, owner, clock, "cdrom_fixed", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( atapicdr )
|
||||
MCFG_CDROM_ADD("image")
|
||||
MCFG_CDROM_INTERFACE("cdrom")
|
||||
@ -81,6 +87,13 @@ void atapi_cdrom_device::device_reset()
|
||||
m_media_change = true;
|
||||
}
|
||||
|
||||
void atapi_fixed_cdrom_device::device_reset()
|
||||
{
|
||||
atapi_hle_device::device_reset();
|
||||
m_cdrom = m_image->get_cdrom_file();
|
||||
m_media_change = false;
|
||||
}
|
||||
|
||||
void atapi_cdrom_device::process_buffer()
|
||||
{
|
||||
if(m_cdrom != m_image->get_cdrom_file())
|
||||
|
@ -35,11 +35,19 @@ protected:
|
||||
virtual void identify_packet_device() override;
|
||||
virtual void process_buffer() override;
|
||||
virtual void ExecCommand() override;
|
||||
private:
|
||||
bool m_media_change;
|
||||
};
|
||||
|
||||
class atapi_fixed_cdrom_device : public atapi_cdrom_device
|
||||
{
|
||||
public:
|
||||
atapi_fixed_cdrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
protected:
|
||||
virtual void device_reset() override;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type ATAPI_CDROM;
|
||||
extern const device_type ATAPI_FIXED_CDROM;
|
||||
|
||||
#endif
|
||||
|
@ -235,6 +235,8 @@ WRITE8_MEMBER( ins8250_uart_device::ins8250_w )
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_regs.lsr & 0x20)
|
||||
trigger_int(COM_INT_PENDING_TRANSMITTER_HOLDING_REGISTER_EMPTY);
|
||||
m_regs.ier = data;
|
||||
update_interrupt();
|
||||
}
|
||||
|
@ -144,6 +144,7 @@ Keyboard Mania 2nd Mix - dongle, program CD, audio CD
|
||||
#include "machine/rtc65271.h"
|
||||
#include "machine/ins8250.h"
|
||||
#include "machine/midikbd.h"
|
||||
#include "machine/atapicdr.h"
|
||||
#include "sound/ymz280b.h"
|
||||
#include "sound/cdda.h"
|
||||
#include "sound/rf5c400.h"
|
||||
@ -1268,6 +1269,10 @@ static MACHINE_CONFIG_FRAGMENT( cdrom_config )
|
||||
MCFG_SOUND_ROUTE(1, "^^^^rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static SLOT_INTERFACE_START(firebeat_ata_devices)
|
||||
SLOT_INTERFACE("cdrom", ATAPI_FIXED_CDROM)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static MACHINE_CONFIG_START( firebeat, firebeat_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -1284,7 +1289,7 @@ static MACHINE_CONFIG_START( firebeat, firebeat_state )
|
||||
MCFG_FUJITSU_29F016A_ADD("flash_snd1")
|
||||
MCFG_FUJITSU_29F016A_ADD("flash_snd2")
|
||||
|
||||
MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "cdrom", "cdrom", true)
|
||||
MCFG_ATA_INTERFACE_ADD("ata", firebeat_ata_devices, "cdrom", "cdrom", true)
|
||||
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(firebeat_state, ata_interrupt))
|
||||
|
||||
MCFG_DEVICE_MODIFY("ata:1")
|
||||
@ -1344,7 +1349,7 @@ static MACHINE_CONFIG_START( firebeat2, firebeat_state )
|
||||
MCFG_FUJITSU_29F016A_ADD("flash_snd1")
|
||||
MCFG_FUJITSU_29F016A_ADD("flash_snd2")
|
||||
|
||||
MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "cdrom", "cdrom", true)
|
||||
MCFG_ATA_INTERFACE_ADD("ata", firebeat_ata_devices, "cdrom", "cdrom", true)
|
||||
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(firebeat_state, ata_interrupt))
|
||||
|
||||
MCFG_DEVICE_MODIFY("ata:1")
|
||||
@ -1410,7 +1415,7 @@ static MACHINE_CONFIG_DERIVED( firebeat_spu, firebeat )
|
||||
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
|
||||
MCFG_ATA_INTERFACE_ADD("spu_ata", ata_devices, "cdrom", nullptr, true)
|
||||
MCFG_ATA_INTERFACE_ADD("spu_ata", firebeat_ata_devices, "cdrom", nullptr, true)
|
||||
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(firebeat_state, spu_ata_interrupt))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user