gkigt: Hook up QUARTs

Commented out for now to not interfere with development.
This commit is contained in:
Dirk Best 2018-02-09 17:11:51 +01:00
parent 5a9ba1708c
commit a7cb7b8e58

View File

@ -92,9 +92,11 @@ More chips (from eBay auction):
#include "emu.h"
#include "cpu/i960/i960.h"
#include "machine/mc68681.h"
#include "machine/nvram.h"
#include "video/ramdac.h"
#include "sound/ymz280b.h"
#include "bus/rs232/rs232.h"
#include "screen.h"
#include "speaker.h"
@ -107,7 +109,8 @@ public:
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette"),
m_screen(*this, "screen"),
m_vram(*this, "vram")
m_vram(*this, "vram"),
m_quart1(*this, "quart1")
{ }
@ -141,6 +144,7 @@ private:
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
required_shared_ptr<uint32_t> m_vram;
required_device<sc28c94_device> m_quart1;
uint8_t m_irq_enable;
uint8_t m_irq_pend;
@ -239,7 +243,7 @@ static ADDRESS_MAP_START( igt_gameking_map, AS_PROGRAM, 32, igt_gameking_state )
// 28050000: SOUND SEL
// 28060000: COLOR SEL
// 28070000: OUT SEL
// AM_RANGE(0x28010000, 0x2801007f) AM_READ(igt_gk_28010008_r) AM_WRITENOP
// AM_RANGE(0x28010000, 0x2801007f) AM_DEVREADWRITE8("quart1", sc28c94_device, read, write, 0x00ff00ff)
AM_RANGE(0x28010008, 0x2801000b) AM_READ(uart_status_r)
AM_RANGE(0x2801001c, 0x2801001f) AM_WRITENOP
AM_RANGE(0x28010030, 0x28010033) AM_READ(uart_status_r) // channel D
@ -247,7 +251,7 @@ static ADDRESS_MAP_START( igt_gameking_map, AS_PROGRAM, 32, igt_gameking_state )
AM_RANGE(0x28020000, 0x280205ff) AM_RAM // CMOS?
// AM_RANGE(0x28020000, 0x2802007f) AM_READ(igt_gk_28010008_r) AM_WRITENOP
AM_RANGE(0x28030000, 0x28030003) AM_READ_PORT("IN0")
// 28040000-2804007f: second 28C94 QUART
// AM_RANGE(0x28040000, 0x2804007f) AM_DEVREADWRITE8("quart2", sc28c94_device, read, write, 0x00ff00ff)
AM_RANGE(0x28040008, 0x2804000b) AM_WRITE8(unk_w,0x00ff0000)
AM_RANGE(0x28040008, 0x2804000b) AM_READWRITE8(irq_vector_r,irq_enable_w,0x000000ff)
AM_RANGE(0x28040018, 0x2804001b) AM_READ_PORT("IN1") AM_WRITENOP
@ -573,6 +577,7 @@ void igt_gameking_state::machine_start()
void igt_gameking_state::machine_reset()
{
m_timer_count = 0;
m_quart1->ip2_w(1); // needs to be high
}
INTERRUPT_GEN_MEMBER(igt_gameking_state::vblank_irq)
@ -585,7 +590,14 @@ INTERRUPT_GEN_MEMBER(igt_gameking_state::vblank_irq)
}
}
static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_38400 )
DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_38400 )
DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 )
DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 )
DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE )
DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 )
DEVICE_INPUT_DEFAULTS_END
MACHINE_CONFIG_START(igt_gameking_state::igt_gameking)
@ -594,6 +606,16 @@ MACHINE_CONFIG_START(igt_gameking_state::igt_gameking)
MCFG_CPU_PROGRAM_MAP(igt_gameking_map)
MCFG_CPU_VBLANK_INT_DRIVER("screen", igt_gameking_state, vblank_irq)
MCFG_SC28C94_ADD("quart1", XTAL(24'000'000) / 6)
MCFG_SC28C94_D_TX_CALLBACK(DEVWRITELINE("diag", rs232_port_device, write_txd))
MCFG_SC28C94_ADD("quart2", XTAL(24'000'000) / 6)
MCFG_MC68681_IRQ_CALLBACK(INPUTLINE("maincpu", I960_IRQ0))
MCFG_RS232_PORT_ADD("diag", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("quart1", sc28c94_device, rx_d_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
MCFG_GFXDECODE_ADD("gfxdecode", "palette", igt_gameking)
MCFG_SCREEN_ADD("screen", RASTER)