mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
misc: small cleanups
This commit is contained in:
parent
5c8953fb02
commit
8c982565f1
@ -126,7 +126,7 @@ void epson_pf10_device::device_reset()
|
||||
|
||||
TIMER_CALLBACK_MEMBER( epson_pf10_device::serial_clk_tick )
|
||||
{
|
||||
m_cpu->m6801_clock_serial();
|
||||
m_cpu->clock_serial();
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "emu.h"
|
||||
#include "loopback.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(RS232_LOOPBACK, rs232_loopback_device, "rs232_loopback", "RS232 Loopback")
|
||||
DEFINE_DEVICE_TYPE(RS232_LOOPBACK, rs232_loopback_device, "rs232_loopback", "RS-232 Loopback")
|
||||
|
||||
rs232_loopback_device::rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, RS232_LOOPBACK, tag, owner, clock)
|
||||
@ -43,7 +43,7 @@ void rs232_loopback_device::input_dtr(int state)
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(DEC_RS232_LOOPBACK, dec_rs232_loopback_device, "dec_rs232_loopback", "RS232 Loopback (DEC 12-15336-00)")
|
||||
DEFINE_DEVICE_TYPE(DEC_RS232_LOOPBACK, dec_rs232_loopback_device, "dec_rs232_loopback", "RS-232 Loopback (DEC 12-15336-00)")
|
||||
|
||||
dec_rs232_loopback_device::dec_rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, DEC_RS232_LOOPBACK, tag, owner, clock)
|
||||
|
@ -149,4 +149,4 @@ void null_modem_device::rcv_complete()
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(NULL_MODEM, null_modem_device, "null_modem", "RS232 Null Modem")
|
||||
DEFINE_DEVICE_TYPE(NULL_MODEM, null_modem_device, "null_modem", "RS-232 Null Modem")
|
||||
|
@ -159,4 +159,4 @@ TIMER_CALLBACK_MEMBER(pseudo_terminal_device::update_queue)
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(PSEUDO_TERMINAL, pseudo_terminal_device, "pseudo_terminal", "Pseudo terminal")
|
||||
DEFINE_DEVICE_TYPE(PSEUDO_TERMINAL, pseudo_terminal_device, "pseudo_terminal", "Pseudo Terminal")
|
||||
|
@ -198,4 +198,4 @@ void rs232_sync_io_device::update_serial(int state)
|
||||
m_clk_timer->adjust(period , 0 , period);
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(RS232_SYNC_IO, rs232_sync_io_device, "rs232_sync_io", "RS232 Synchronous I/O")
|
||||
DEFINE_DEVICE_TYPE(RS232_SYNC_IO, rs232_sync_io_device, "rs232_sync_io", "RS-232 Synchronous I/O")
|
||||
|
@ -39,8 +39,8 @@ TODO:
|
||||
#include "softlist_dev.h"
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(OSA_MAESTRO, saitekosa_maestro_device, "osa_maestro", "Maestro B-D")
|
||||
DEFINE_DEVICE_TYPE(OSA_ANALYST, saitekosa_analyst_device, "osa_analyst", "Analyst")
|
||||
DEFINE_DEVICE_TYPE(OSA_MAESTRO, saitekosa_maestro_device, "osa_maestro", "Saitek OSA Maestro B-D")
|
||||
DEFINE_DEVICE_TYPE(OSA_ANALYST, saitekosa_analyst_device, "osa_analyst", "Saitek OSA Analyst")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -29,7 +29,7 @@ compatible for upgrading to newer Maestro versions.
|
||||
#include "softlist_dev.h"
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(OSA_MAESTROA, saitekosa_maestroa_device, "osa_maestroa", "Maestro A")
|
||||
DEFINE_DEVICE_TYPE(OSA_MAESTROA, saitekosa_maestroa_device, "osa_maestroa", "Saitek OSA Maestro A")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -36,7 +36,7 @@ TODO:
|
||||
#include "sparc.h"
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(OSA_SPARC, saitekosa_sparc_device, "osa_sparc", "Sparc")
|
||||
DEFINE_DEVICE_TYPE(OSA_SPARC, saitekosa_sparc_device, "osa_sparc", "Saitek OSA Sparc")
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -996,7 +996,7 @@ void hd6301x_cpu_device::set_rmcr(u8 data)
|
||||
}
|
||||
}
|
||||
|
||||
int m6801_cpu_device::m6800_rx()
|
||||
int m6801_cpu_device::m6801_rx()
|
||||
{
|
||||
return (m_in_port_func[1]() & M6801_PORT2_IO3) >> 3;
|
||||
}
|
||||
@ -1097,7 +1097,7 @@ void m6801_cpu_device::serial_receive()
|
||||
if (m_trcsr & M6801_TRCSR_WU)
|
||||
{
|
||||
// wait for 10 bits of '1'
|
||||
if (m6800_rx() == 1)
|
||||
if (m6801_rx() == 1)
|
||||
{
|
||||
m_rxbits++;
|
||||
|
||||
@ -1124,7 +1124,7 @@ void m6801_cpu_device::serial_receive()
|
||||
switch (m_rxbits)
|
||||
{
|
||||
case M6801_SERIAL_START:
|
||||
if (m6800_rx() == 0)
|
||||
if (m6801_rx() == 0)
|
||||
{
|
||||
// start bit found
|
||||
m_rxbits++;
|
||||
@ -1134,7 +1134,7 @@ void m6801_cpu_device::serial_receive()
|
||||
break;
|
||||
|
||||
case M6801_SERIAL_STOP:
|
||||
if (m6800_rx() == 1)
|
||||
if (m6801_rx() == 1)
|
||||
{
|
||||
LOGRX("SCI Received STOP bit\n");
|
||||
|
||||
@ -1188,7 +1188,7 @@ void m6801_cpu_device::serial_receive()
|
||||
m_rsr >>= 1;
|
||||
|
||||
// receive bit into register
|
||||
m_rsr |= (m6800_rx() << 7);
|
||||
m_rsr |= (m6801_rx() << 7);
|
||||
|
||||
LOGRX("SCI RX sampled DATA bit %u: %u\n", m_rxbits, BIT(m_rsr, 7));
|
||||
|
||||
@ -2547,7 +2547,7 @@ u8 m6801_cpu_device::ff_r()
|
||||
}
|
||||
|
||||
|
||||
void m6801_cpu_device::m6801_clock_serial()
|
||||
void m6801_cpu_device::clock_serial()
|
||||
{
|
||||
if (m_use_ext_serclock)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
auto standby_cb() { return m_standby_func.bind(); } // notifier (not an output pin)
|
||||
int standby() { return suspended(SUSPEND_REASON_CLOCK) ? 1 : 0; }
|
||||
|
||||
void m6801_clock_serial();
|
||||
void clock_serial();
|
||||
|
||||
protected:
|
||||
m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const m6800_cpu_device::op_func *insn, const u8 *cycles, address_map_constructor internal, int nvram_bytes);
|
||||
@ -194,7 +194,7 @@ protected:
|
||||
virtual void check_timer_event();
|
||||
virtual void set_rmcr(u8 data);
|
||||
virtual void write_port2();
|
||||
int m6800_rx();
|
||||
int m6801_rx();
|
||||
void serial_transmit();
|
||||
void serial_receive();
|
||||
TIMER_CALLBACK_MEMBER(sci_tick);
|
||||
|
@ -145,7 +145,7 @@ void mpu401_device::device_reset()
|
||||
|
||||
TIMER_CALLBACK_MEMBER(mpu401_device::serial_tick)
|
||||
{
|
||||
m_ourcpu->m6801_clock_serial();
|
||||
m_ourcpu->clock_serial();
|
||||
}
|
||||
|
||||
uint8_t mpu401_device::port1_r()
|
||||
|
@ -451,7 +451,7 @@ void mg1_state::mg1(machine_config &config)
|
||||
* selects a 256 divisor, giving a 9600Hz clock which after the 8x divider in the IOP gives a 1200 baud data rate.
|
||||
*/
|
||||
clock_device &kbd_clk(CLOCK(config, "kbd_clock", 2.4576_MHz_XTAL / 256));
|
||||
kbd_clk.signal_handler().set([this](int state) { if (state) m_iop->m6801_clock_serial(); });
|
||||
kbd_clk.signal_handler().set([this](int state) { if (state) m_iop->clock_serial(); });
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_buzzer);
|
||||
|
@ -341,7 +341,7 @@ void vampire_state::blit_trigger(offs_t offset)
|
||||
const u8 pen = slot[5]; // 0xf is max used
|
||||
|
||||
const int32_t sy = 256 - slot[2]; // pixels
|
||||
const int32_t sx = ((32 - slot[3])) << 3; // bytes (src ROM)
|
||||
const int32_t sx = (32 - slot[3]) << 3; // bytes (src ROM)
|
||||
|
||||
for (int yy = 0; yy < sy; ++yy)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ of this portable design (Ruby, Sapphire, ..) are on H8.
|
||||
|
||||
TODO:
|
||||
- if/when MAME supports an exit callback, hook up power-off switch to that
|
||||
- add Super System peripherals, each has their own MCU
|
||||
- add more Super System peripherals, each has their own MCU
|
||||
- unmapped reads from 0x3* range, same as snova driver
|
||||
|
||||
BTANB:
|
||||
|
@ -65,11 +65,12 @@ List of signals on pin headers (from CompuTime manual):
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
//#include "bus/s100/s100.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
//#include "bus/s100/s100.h"
|
||||
|
||||
|
||||
namespace {
|
||||
@ -88,13 +89,14 @@ public:
|
||||
, m_cpu_speed(*this, "SPEED")
|
||||
, m_eprom(*this, "maincpu")
|
||||
, m_p_ram(*this, "ram")
|
||||
, m_rts(true)
|
||||
, m_dtr(true)
|
||||
{ }
|
||||
|
||||
void qtsbc(machine_config &config);
|
||||
void io_map(address_map &map);
|
||||
void mem_map(address_map &map);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
u8 memory_r(offs_t offset);
|
||||
void memory_w(offs_t offset, u8 data);
|
||||
@ -103,8 +105,9 @@ private:
|
||||
void rts_loopback_w(int state);
|
||||
void dtr_loopback_w(int state);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
void io_map(address_map &map);
|
||||
void mem_map(address_map &map);
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<pit8253_device> m_pit;
|
||||
required_device<i8251_device> m_usart;
|
||||
@ -115,8 +118,8 @@ private:
|
||||
required_region_ptr<u8> m_eprom;
|
||||
required_shared_ptr<u8> m_p_ram;
|
||||
bool m_power_on = false;
|
||||
bool m_rts;
|
||||
bool m_dtr;
|
||||
s32 m_rts = 1;
|
||||
s32 m_dtr = 1;
|
||||
};
|
||||
|
||||
|
||||
@ -201,7 +204,6 @@ u8 qtsbc_state::io_r(offs_t offset)
|
||||
return 0x00;
|
||||
|
||||
// Ports 08, 10 and 80 also used for read access
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
@ -234,7 +236,6 @@ void qtsbc_state::io_w(offs_t offset, u8 data)
|
||||
else
|
||||
{
|
||||
// TODO: S-100 bus (no address mirroring)
|
||||
|
||||
logerror("Output %02X to %04X\n", data, offset);
|
||||
}
|
||||
}
|
||||
@ -242,7 +243,7 @@ void qtsbc_state::io_w(offs_t offset, u8 data)
|
||||
void qtsbc_state::rts_loopback_w(int state)
|
||||
{
|
||||
// Filtered through this routine to avoid infinite loops
|
||||
if (state != bool(m_rts))
|
||||
if (state != m_rts)
|
||||
{
|
||||
m_rts = state;
|
||||
m_rs232->write_rts(m_rts);
|
||||
@ -252,7 +253,7 @@ void qtsbc_state::rts_loopback_w(int state)
|
||||
void qtsbc_state::dtr_loopback_w(int state)
|
||||
{
|
||||
// Filtered through this routine to avoid infinite loops
|
||||
if (state != bool(m_dtr))
|
||||
if (state != m_dtr)
|
||||
{
|
||||
m_dtr = state;
|
||||
m_rs232->write_dtr(m_dtr);
|
||||
@ -503,6 +504,7 @@ void qtsbc_state::machine_start()
|
||||
|
||||
save_item(NAME(m_power_on));
|
||||
save_item(NAME(m_rts));
|
||||
save_item(NAME(m_dtr));
|
||||
}
|
||||
|
||||
void qtsbc_state::machine_reset()
|
||||
|
@ -334,7 +334,7 @@ void yamaha_dx100_state::palette_init(palette_device &palette)
|
||||
void yamaha_dx100_state::p22_w(int state)
|
||||
{
|
||||
if (state)
|
||||
m_maincpu->m6801_clock_serial();
|
||||
m_maincpu->clock_serial();
|
||||
}
|
||||
|
||||
void yamaha_dx100_state::mem_map(address_map &map)
|
||||
|
@ -135,7 +135,7 @@ private:
|
||||
|
||||
void midi_r(int state) { m_rx_data = state; }
|
||||
|
||||
void midiclock_w(int state) { if (state) m_maincpu->m6801_clock_serial(); }
|
||||
void midiclock_w(int state) { if (state) m_maincpu->clock_serial(); }
|
||||
|
||||
/**
|
||||
* @brief Handle a write to the synth's IO Port 1.
|
||||
|
@ -47,7 +47,7 @@ private:
|
||||
|
||||
u8 p2_r();
|
||||
void midi_rx_r(int state) { m_rx_data = state; }
|
||||
void midiclock_w(int state) { if (state) m_maincpu->m6801_clock_serial(); }
|
||||
void midiclock_w(int state) { if (state) m_maincpu->clock_serial(); }
|
||||
|
||||
required_device<hd6303x_cpu_device> m_maincpu;
|
||||
required_ioport m_port2;
|
||||
|
@ -12,7 +12,7 @@ properly.
|
||||
|
||||
Hardware notes:
|
||||
- PCB label: CHESS3 YENO 416XL
|
||||
- Hitachi HD63B01Y0P @ ~8MHz (LC oscillator)
|
||||
- Hitachi HD6301Y0P @ ~8MHz (LC oscillator)
|
||||
- 8*8 chessboard buttons, 16+7 LEDs, piezo
|
||||
|
||||
TODO:
|
||||
|
Loading…
Reference in New Issue
Block a user