mirror of
https://github.com/libretro/mame.git
synced 2025-02-21 19:31:32 +00:00
(mess) compis: fix HLE keyboard and cleanup (nw)
This commit is contained in:
parent
2cad11125e
commit
80fa5fade3
@ -114,7 +114,7 @@ static UPD7220_INTERFACE( hgdc_intf )
|
||||
/* TODO: why it writes to ROM region? */
|
||||
WRITE8_MEMBER( compis_state::vram_w )
|
||||
{
|
||||
m_video_ram[offset+0x1ffff] = data;
|
||||
m_video_ram[offset+0x20000] = data;
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( compis_mem , AS_PROGRAM, 16, compis_state )
|
||||
@ -133,7 +133,7 @@ static ADDRESS_MAP_START( compis_io, AS_IO, 16, compis_state )
|
||||
AM_RANGE( 0x0100, 0x011b) AM_DEVREADWRITE8("mm58274c", mm58274c_device, read, write, 0xffff)
|
||||
AM_RANGE( 0x0280, 0x0283) AM_DEVREADWRITE8("pic8259_master", pic8259_device, read, write, 0x00ff) /* 80150/80130 */
|
||||
//AM_RANGE( 0x0288, 0x028f) AM_DEVREADWRITE_LEGACY("pit8254", compis_osp_pit_r, compis_osp_pit_w ) /* PIT 8254 (80150/80130) */
|
||||
AM_RANGE( 0x0310, 0x031f) AM_READWRITE( compis_usart_r, compis_usart_w ) /* USART 8251 Keyboard */
|
||||
AM_RANGE( 0x0310, 0x031f) AM_READWRITE8( compis_usart_r, compis_usart_w, 0xff00) /* USART 8251 Keyboard */
|
||||
AM_RANGE( 0x0330, 0x0333) AM_DEVREADWRITE8("upd7220", upd7220_device, read, write, 0x00ff) /* GDC 82720 PCS6:6 */
|
||||
AM_RANGE( 0x0340, 0x0343) AM_DEVICE8("i8272a", i8272a_device, map, 0x00ff) /* iSBX0 (J8) FDC 8272 */
|
||||
AM_RANGE( 0x0350, 0x0351) AM_DEVREADWRITE8("i8272a", i8272a_device, mdma_r, mdma_w, 0x00ff) /* iSBX0 (J8) DMA ACK */
|
||||
@ -281,6 +281,7 @@ static INPUT_PORTS_START (compis)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad ,") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad -") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Keypad +") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
|
||||
PORT_BIT( 0xE000, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("DSW0")
|
||||
PORT_DIPNAME( 0x18, 0x00, "S8 Test mode")
|
||||
@ -296,8 +297,6 @@ static INPUT_PORTS_START (compis)
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
//static const unsigned i86_address_mask = 0x000fffff;
|
||||
|
||||
static const mm58274c_interface compis_mm58274c_interface =
|
||||
{
|
||||
0, /* mode 24*/
|
||||
@ -331,7 +330,6 @@ static MACHINE_CONFIG_START( compis, compis_state )
|
||||
MCFG_CPU_IO_MAP(compis_io)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", compis_state, compis_vblank_int)
|
||||
MCFG_80186_IRQ_SLAVE_ACK(DEVREAD8(DEVICE_SELF, compis_state, compis_irq_callback))
|
||||
//MCFG_CPU_CONFIG(i86_address_mask)
|
||||
|
||||
//MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
|
||||
@ -354,7 +352,6 @@ static MACHINE_CONFIG_START( compis, compis_state )
|
||||
MCFG_PIT8253_ADD( "pit8253", compis_pit8253_config )
|
||||
MCFG_PIT8254_ADD( "pit8254", compis_pit8254_config )
|
||||
MCFG_PIC8259_ADD( "pic8259_master", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NULL )
|
||||
//MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir2_w), GND, NULL )
|
||||
MCFG_I8255_ADD( "ppi8255", compis_ppi_interface )
|
||||
MCFG_UPD7220_ADD("upd7220", XTAL_4_433619MHz/2, hgdc_intf, upd7220_map) //unknown clock
|
||||
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
|
||||
@ -376,7 +373,6 @@ static MACHINE_CONFIG_START( compis2, compis_state )
|
||||
MCFG_CPU_IO_MAP(compis_io)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", compis_state, compis_vblank_int)
|
||||
MCFG_80186_IRQ_SLAVE_ACK(DEVREAD8(DEVICE_SELF, compis_state, compis_irq_callback))
|
||||
//MCFG_CPU_CONFIG(i86_address_mask)
|
||||
|
||||
//MCFG_QUANTUM_TIME(attotime::from_hz(60))
|
||||
|
||||
@ -395,7 +391,6 @@ static MACHINE_CONFIG_START( compis2, compis_state )
|
||||
MCFG_PIT8253_ADD( "pit8253", compis_pit8253_config )
|
||||
MCFG_PIT8254_ADD( "pit8254", compis_pit8254_config )
|
||||
MCFG_PIC8259_ADD( "pic8259_master", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NULL )
|
||||
//MCFG_PIC8259_ADD( "pic8259_slave", DEVWRITELINE("pic8259_master", pic8259_device, ir2_w), GND, NULL )
|
||||
MCFG_I8255_ADD( "ppi8255", compis_ppi_interface )
|
||||
MCFG_UPD7220_ADD("upd7220", XTAL_4_433619MHz/2, hgdc_intf, upd7220_map) //unknown clock
|
||||
MCFG_CENTRONICS_PRINTER_ADD("centronics", standard_centronics)
|
||||
|
@ -27,60 +27,6 @@
|
||||
#include "formats/cpis_dsk.h"
|
||||
|
||||
|
||||
struct mem_state
|
||||
{
|
||||
UINT16 lower;
|
||||
UINT16 upper;
|
||||
UINT16 middle;
|
||||
UINT16 middle_size;
|
||||
UINT16 peripheral;
|
||||
};
|
||||
|
||||
struct timer_state
|
||||
{
|
||||
UINT16 control;
|
||||
UINT16 maxA;
|
||||
UINT16 maxB;
|
||||
UINT16 count;
|
||||
emu_timer * int_timer;
|
||||
emu_timer * time_timer;
|
||||
UINT8 time_timer_active;
|
||||
attotime last_time;
|
||||
};
|
||||
|
||||
struct dma_state
|
||||
{
|
||||
UINT32 source;
|
||||
UINT32 dest;
|
||||
UINT16 count;
|
||||
UINT16 control;
|
||||
UINT8 finished;
|
||||
emu_timer * finish_timer;
|
||||
};
|
||||
|
||||
struct intr_state
|
||||
{
|
||||
UINT8 pending;
|
||||
UINT16 ack_mask;
|
||||
UINT16 priority_mask;
|
||||
UINT16 in_service;
|
||||
UINT16 request;
|
||||
UINT16 status;
|
||||
UINT16 poll_status;
|
||||
UINT16 timer;
|
||||
UINT16 dma[2];
|
||||
UINT16 ext[4];
|
||||
};
|
||||
|
||||
struct i186_state
|
||||
{
|
||||
struct timer_state timer[3];
|
||||
struct dma_state dma[2];
|
||||
struct intr_state intr;
|
||||
struct mem_state mem;
|
||||
};
|
||||
|
||||
|
||||
/* Keyboard */
|
||||
struct TYP_COMPIS_KEYBOARD
|
||||
{
|
||||
@ -133,7 +79,6 @@ public:
|
||||
m_8253(*this, "pit8253"),
|
||||
m_8254(*this, "pit8254"),
|
||||
m_8259m(*this, "pic8259_master"),
|
||||
// m_8259s(*this, "pic8259_slave"),
|
||||
m_8255(*this, "ppi8255"),
|
||||
m_centronics(*this, "centronics"),
|
||||
m_uart(*this, "uart"),
|
||||
@ -146,33 +91,21 @@ public:
|
||||
required_device<pit8253_device> m_8253;
|
||||
required_device<pit8254_device> m_8254;
|
||||
required_device<pic8259_device> m_8259m;
|
||||
// required_device<pic8259_device> m_8259s;
|
||||
required_device<i8255_device> m_8255;
|
||||
required_device<centronics_device> m_centronics;
|
||||
required_device<i8251_device> m_uart;
|
||||
required_device<mm58274c_device> m_rtc;
|
||||
required_device<i8272a_device> m_fdc;
|
||||
required_device<upd7220_device> m_crtc;
|
||||
DECLARE_READ16_MEMBER(compis_usart_r);
|
||||
DECLARE_WRITE16_MEMBER(compis_usart_w);
|
||||
// DECLARE_READ16_MEMBER(compis_i186_internal_port_r);
|
||||
// DECLARE_WRITE16_MEMBER(compis_i186_internal_port_w);
|
||||
DECLARE_READ8_MEMBER(compis_usart_r);
|
||||
DECLARE_WRITE8_MEMBER(compis_usart_w);
|
||||
DECLARE_WRITE8_MEMBER(vram_w);
|
||||
DECLARE_READ8_MEMBER(compis_ppi_port_b_r);
|
||||
DECLARE_WRITE8_MEMBER(compis_ppi_port_c_w);
|
||||
DECLARE_READ16_MEMBER(compis_osp_pit_r);
|
||||
DECLARE_WRITE16_MEMBER(compis_osp_pit_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(compis_usart_rxready);
|
||||
// DECLARE_WRITE_LINE_MEMBER(compis_pic8259_master_set_int_line);
|
||||
// DECLARE_WRITE_LINE_MEMBER(compis_pic8259_slave_set_int_line);
|
||||
// DECLARE_READ8_MEMBER(get_slave_ack);
|
||||
// i186_state m_i186;
|
||||
TYP_COMPIS m_compis;
|
||||
UINT8 *m_p_videoram;
|
||||
// void update_dma_control(int which, int new_control);
|
||||
// void internal_timer_update(int which, int new_count, int new_maxA, int new_maxB, int new_control);
|
||||
// void internal_timer_sync(int which);
|
||||
// void handle_eoi(int data);
|
||||
void compis_fdc_tc(int state);
|
||||
DECLARE_READ8_MEMBER(fdc_mon_r);
|
||||
DECLARE_WRITE8_MEMBER(fdc_mon_w);
|
||||
@ -188,16 +121,10 @@ public:
|
||||
virtual void palette_init();
|
||||
UINT32 screen_update_compis2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(compis_vblank_int);
|
||||
// TIMER_CALLBACK_MEMBER(internal_timer_int);
|
||||
// TIMER_CALLBACK_MEMBER(dma_timer_callback);
|
||||
// IRQ_CALLBACK_MEMBER(int_callback);
|
||||
DECLARE_READ8_MEMBER(compis_irq_callback);
|
||||
void compis_irq_set(UINT8 irq);
|
||||
void compis_keyb_update();
|
||||
void compis_keyb_init();
|
||||
void compis_fdc_reset();
|
||||
void update_interrupt_state();
|
||||
void compis_cpu_init();
|
||||
};
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user