mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
(nw) cleanups
This commit is contained in:
parent
d09e8e345d
commit
82edf4ebba
@ -54,21 +54,22 @@ class d6800_state : public driver_device
|
||||
{
|
||||
public:
|
||||
d6800_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_cass(*this, "cassette"),
|
||||
m_pia(*this, "pia"),
|
||||
m_beeper(*this, "beeper"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_io_x0(*this, "X0"),
|
||||
m_io_x1(*this, "X1"),
|
||||
m_io_x2(*this, "X2"),
|
||||
m_io_x3(*this, "X3"),
|
||||
m_io_y0(*this, "Y0"),
|
||||
m_io_y1(*this, "Y1"),
|
||||
m_io_y2(*this, "Y2"),
|
||||
m_io_y3(*this, "Y3"),
|
||||
m_io_shift(*this, "SHIFT") { }
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_cass(*this, "cassette")
|
||||
, m_pia(*this, "pia")
|
||||
, m_beeper(*this, "beeper")
|
||||
, m_videoram(*this, "videoram")
|
||||
, m_io_x0(*this, "X0")
|
||||
, m_io_x1(*this, "X1")
|
||||
, m_io_x2(*this, "X2")
|
||||
, m_io_x3(*this, "X3")
|
||||
, m_io_y0(*this, "Y0")
|
||||
, m_io_y1(*this, "Y1")
|
||||
, m_io_y2(*this, "Y2")
|
||||
, m_io_y3(*this, "Y3")
|
||||
, m_io_shift(*this, "SHIFT")
|
||||
{ }
|
||||
|
||||
DECLARE_READ8_MEMBER( d6800_cassette_r );
|
||||
DECLARE_WRITE8_MEMBER( d6800_cassette_w );
|
||||
@ -79,7 +80,15 @@ public:
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(d6800_c);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(d6800_p);
|
||||
DECLARE_QUICKLOAD_LOAD_MEMBER( d6800 );
|
||||
protected:
|
||||
|
||||
private:
|
||||
uint8_t m_rtc;
|
||||
bool m_cb2;
|
||||
bool m_cassold;
|
||||
uint8_t m_cass_data[4];
|
||||
uint8_t m_portb;
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cassette_image_device> m_cass;
|
||||
required_device<pia6821_device> m_pia;
|
||||
@ -94,14 +103,6 @@ protected:
|
||||
required_ioport m_io_y2;
|
||||
required_ioport m_io_y3;
|
||||
required_ioport m_io_shift;
|
||||
private:
|
||||
uint8_t m_rtc;
|
||||
bool m_cb2;
|
||||
bool m_cassold;
|
||||
uint8_t m_cass_data[4];
|
||||
uint8_t m_portb;
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -81,18 +81,15 @@ ToDo:
|
||||
#include "ravens.lh"
|
||||
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class ravens_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ravens_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_cass(*this, "cassette")
|
||||
{
|
||||
}
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, "terminal")
|
||||
, m_cass(*this, "cassette")
|
||||
{ }
|
||||
|
||||
DECLARE_READ8_MEMBER(port07_r);
|
||||
DECLARE_READ8_MEMBER(port17_r);
|
||||
@ -105,6 +102,8 @@ public:
|
||||
DECLARE_READ_LINE_MEMBER(cass_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(cass_w);
|
||||
DECLARE_QUICKLOAD_LOAD_MEMBER( ravens );
|
||||
|
||||
private:
|
||||
uint8_t m_term_char;
|
||||
uint8_t m_term_data;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -358,7 +357,7 @@ static MACHINE_CONFIG_START( ravens2 )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(ravens_state, ravens2)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
|
||||
MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
|
||||
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(ravens_state, kbd_put))
|
||||
|
||||
/* quickload */
|
||||
|
@ -21,7 +21,66 @@ Oxx,yy = Out port
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/superslave.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "machine/com8116.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/z80dart.h"
|
||||
#include "machine/z80pio.h"
|
||||
|
||||
#define Z80_TAG "u45"
|
||||
#define Z80DART_0_TAG "u14"
|
||||
#define Z80DART_1_TAG "u30"
|
||||
#define Z80PIO_TAG "u43"
|
||||
#define AM9519_TAG "u13"
|
||||
#define BR1941_TAG "u12"
|
||||
#define RS232_A_TAG "rs232a"
|
||||
#define RS232_B_TAG "rs232b"
|
||||
#define RS232_C_TAG "rs232c"
|
||||
#define RS232_D_TAG "rs232d"
|
||||
|
||||
class superslave_state : public driver_device
|
||||
{
|
||||
public:
|
||||
superslave_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, Z80_TAG)
|
||||
, m_dbrg(*this, BR1941_TAG)
|
||||
, m_ram(*this, RAM_TAG)
|
||||
, m_rs232a(*this, RS232_A_TAG)
|
||||
, m_rs232b(*this, RS232_B_TAG)
|
||||
, m_rs232c(*this, RS232_C_TAG)
|
||||
, m_rs232d(*this, RS232_D_TAG)
|
||||
, m_rom(*this, Z80_TAG)
|
||||
, m_memctrl(0x01)
|
||||
, m_cmd(0x01)
|
||||
{ }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
DECLARE_WRITE8_MEMBER( baud_w );
|
||||
DECLARE_WRITE8_MEMBER( memctrl_w );
|
||||
DECLARE_READ8_MEMBER( status_r );
|
||||
DECLARE_WRITE8_MEMBER( cmd_w );
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<com8116_device> m_dbrg;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<rs232_port_device> m_rs232a;
|
||||
required_device<rs232_port_device> m_rs232b;
|
||||
required_device<rs232_port_device> m_rs232c;
|
||||
required_device<rs232_port_device> m_rs232d;
|
||||
required_memory_region m_rom;
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
uint8_t m_memctrl;
|
||||
uint8_t m_cmd;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -254,20 +313,6 @@ INPUT_PORTS_END
|
||||
// COM8116_INTERFACE( dbrg_intf )
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER( superslave_state::fr_w )
|
||||
{
|
||||
m_dart0->rxca_w(state);
|
||||
m_dart0->txca_w(state);
|
||||
m_dart1->rxca_w(state);
|
||||
m_dart1->txca_w(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( superslave_state::ft_w )
|
||||
{
|
||||
m_dart0->rxtxcb_w(state);
|
||||
m_dart1->rxtxcb_w(state);
|
||||
}
|
||||
|
||||
|
||||
static DEVICE_INPUT_DEFAULTS_START( terminal )
|
||||
DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 )
|
||||
@ -379,8 +424,12 @@ static MACHINE_CONFIG_START( superslave )
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, ctsb_w))
|
||||
|
||||
MCFG_DEVICE_ADD(BR1941_TAG, COM8116, XTAL_5_0688MHz)
|
||||
MCFG_COM8116_FR_HANDLER(WRITELINE(superslave_state, fr_w))
|
||||
MCFG_COM8116_FT_HANDLER(WRITELINE(superslave_state, ft_w))
|
||||
MCFG_COM8116_FR_HANDLER(DEVWRITELINE(Z80DART_0_TAG, z80dart_device, txca_w))
|
||||
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE(Z80DART_0_TAG, z80dart_device, rxca_w))
|
||||
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, txca_w))
|
||||
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, rxca_w))
|
||||
MCFG_COM8116_FT_HANDLER(DEVWRITELINE(Z80DART_0_TAG, z80dart_device, rxtxcb_w))
|
||||
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, rxtxcb_w))
|
||||
|
||||
// internal ram
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
|
@ -70,7 +70,6 @@ Notes:
|
||||
//#include "votrpss.lh"
|
||||
|
||||
/* Components */
|
||||
#include "machine/clock.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pit8253.h"
|
||||
|
@ -1,75 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Curt Coder
|
||||
#pragma once
|
||||
|
||||
#ifndef __SUPERSLAVE__
|
||||
#define __SUPERSLAVE__
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "machine/com8116.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/z80dart.h"
|
||||
#include "machine/z80pio.h"
|
||||
|
||||
#define Z80_TAG "u45"
|
||||
#define Z80DART_0_TAG "u14"
|
||||
#define Z80DART_1_TAG "u30"
|
||||
#define Z80PIO_TAG "u43"
|
||||
#define AM9519_TAG "u13"
|
||||
#define BR1941_TAG "u12"
|
||||
#define RS232_A_TAG "rs232a"
|
||||
#define RS232_B_TAG "rs232b"
|
||||
#define RS232_C_TAG "rs232c"
|
||||
#define RS232_D_TAG "rs232d"
|
||||
|
||||
class superslave_state : public driver_device
|
||||
{
|
||||
public:
|
||||
superslave_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, Z80_TAG),
|
||||
m_dart0(*this, Z80DART_0_TAG),
|
||||
m_dart1(*this, Z80DART_1_TAG),
|
||||
m_dbrg(*this, BR1941_TAG),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_rs232a(*this, RS232_A_TAG),
|
||||
m_rs232b(*this, RS232_B_TAG),
|
||||
m_rs232c(*this, RS232_C_TAG),
|
||||
m_rs232d(*this, RS232_D_TAG),
|
||||
m_rom(*this, Z80_TAG),
|
||||
m_memctrl(0x01),
|
||||
m_cmd(0x01)
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<z80dart_device> m_dart0;
|
||||
required_device<z80dart_device> m_dart1;
|
||||
required_device<com8116_device> m_dbrg;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<rs232_port_device> m_rs232a;
|
||||
required_device<rs232_port_device> m_rs232b;
|
||||
required_device<rs232_port_device> m_rs232c;
|
||||
required_device<rs232_port_device> m_rs232d;
|
||||
required_memory_region m_rom;
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
DECLARE_WRITE8_MEMBER( baud_w );
|
||||
DECLARE_WRITE8_MEMBER( memctrl_w );
|
||||
DECLARE_READ8_MEMBER( status_r );
|
||||
DECLARE_WRITE8_MEMBER( cmd_w );
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( fr_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( ft_w );
|
||||
|
||||
uint8_t m_memctrl;
|
||||
uint8_t m_cmd;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user