mos6530: rename device to mos6530l

This commit is contained in:
hap 2023-07-25 20:26:11 +02:00
parent 5eed93c035
commit 9a8c1f6564
4 changed files with 49 additions and 40 deletions

View File

@ -2554,6 +2554,30 @@ if (MACHINES["MOS6529"]~=null) then
} }
end end
---------------------------------------------------
--
--@src/devices/machine/mos6530l.h,MACHINES["MOS6530L"] = true
---------------------------------------------------
if (MACHINES["MOS6530L"]~=null) then
files {
MAME_DIR .. "src/devices/machine/mos6530l.cpp",
MAME_DIR .. "src/devices/machine/mos6530l.h",
}
end
---------------------------------------------------
--
--@src/devices/machine/mos6530n.h,MACHINES["MOS6530"] = true
---------------------------------------------------
if (MACHINES["MOS6530"]~=null) then
files {
MAME_DIR .. "src/devices/machine/mos6530n.cpp",
MAME_DIR .. "src/devices/machine/mos6530n.h",
}
end
--------------------------------------------------- ---------------------------------------------------
-- --
--@src/devices/machine/mos6702.h,MACHINES["MOS6702"] = true --@src/devices/machine/mos6702.h,MACHINES["MOS6702"] = true
@ -2602,21 +2626,6 @@ if (MACHINES["MOS8726"]~=null) then
} }
end end
---------------------------------------------------
--
--@src/devices/machine/mos6530.h,MACHINES["MIOT6530"] = true
--@src/devices/machine/mos6530n.h,MACHINES["MIOT6530"] = true
---------------------------------------------------
if (MACHINES["MIOT6530"]~=null) then
files {
MAME_DIR .. "src/devices/machine/mos6530.cpp",
MAME_DIR .. "src/devices/machine/mos6530.h",
MAME_DIR .. "src/devices/machine/mos6530n.cpp",
MAME_DIR .. "src/devices/machine/mos6530n.h",
}
end
--------------------------------------------------- ---------------------------------------------------
-- --
--@src/devices/machine/mos6551.h,MACHINES["MOS6551"] = true --@src/devices/machine/mos6551.h,MACHINES["MOS6551"] = true

View File

@ -63,7 +63,7 @@ MACHINES["ADC0808"] = true
MACHINES["BANKDEV"] = true MACHINES["BANKDEV"] = true
MACHINES["GEN_LATCH"] = true MACHINES["GEN_LATCH"] = true
MACHINES["INPUT_MERGER"] = true MACHINES["INPUT_MERGER"] = true
MACHINES["MIOT6530"] = true MACHINES["MOS6530"] = true
MACHINES["NETLIST"] = true MACHINES["NETLIST"] = true
MACHINES["OUTPUT_LATCH"] = true MACHINES["OUTPUT_LATCH"] = true
MACHINES["PIT8253"] = true MACHINES["PIT8253"] = true

View File

@ -19,7 +19,7 @@ and should be verified against real hardware.
***************************************************************************/ ***************************************************************************/
#include "emu.h" #include "emu.h"
#include "mos6530.h" #include "mos6530l.h"
/*************************************************************************** /***************************************************************************
@ -39,10 +39,10 @@ enum
DEVICE INTERFACE DEVICE INTERFACE
***************************************************************************/ ***************************************************************************/
DEFINE_DEVICE_TYPE(MOS6530, mos6530_device, "mos6530", "MOS 6530 MIOT") DEFINE_DEVICE_TYPE(MOS6530L, mos6530l_device, "mos6530l", "MOS 6530 MIOT L")
mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mos6530l_device::mos6530l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, MOS6530, tag, owner, clock), device_t(mconfig, MOS6530L, tag, owner, clock),
m_in_pa_cb(*this, 0), m_in_pa_cb(*this, 0),
m_out_pa_cb(*this), m_out_pa_cb(*this),
m_in_pb_cb(*this, 0), m_in_pb_cb(*this, 0),
@ -54,13 +54,13 @@ mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, d
// device_start - device-specific startup // device_start - device-specific startup
//------------------------------------------------- //-------------------------------------------------
void mos6530_device::device_start() void mos6530l_device::device_start()
{ {
/* set static values */ /* set static values */
m_clock = clock(); m_clock = clock();
/* allocate timers */ /* allocate timers */
m_timer = timer_alloc(FUNC(mos6530_device::end_state), this); m_timer = timer_alloc(FUNC(mos6530l_device::end_state), this);
/* register for save states */ /* register for save states */
save_item(NAME(m_port[0].m_in)); save_item(NAME(m_port[0].m_in));
@ -81,7 +81,7 @@ void mos6530_device::device_start()
// device_reset - device-specific reset // device_reset - device-specific reset
//------------------------------------------------- //-------------------------------------------------
void mos6530_device::device_reset() void mos6530l_device::device_reset()
{ {
/* reset I/O states */ /* reset I/O states */
m_port[0].m_out = 0; m_port[0].m_out = 0;
@ -111,7 +111,7 @@ void mos6530_device::device_reset()
based on interrupt enables based on interrupt enables
-------------------------------------------------*/ -------------------------------------------------*/
void mos6530_device::update_irqstate() void mos6530l_device::update_irqstate()
{ {
uint8_t out = m_port[1].m_out; uint8_t out = m_port[1].m_out;
@ -126,7 +126,7 @@ void mos6530_device::update_irqstate()
get_timer - return the current timer value get_timer - return the current timer value
-------------------------------------------------*/ -------------------------------------------------*/
uint8_t mos6530_device::get_timer() uint8_t mos6530l_device::get_timer()
{ {
/* if idle, return 0 */ /* if idle, return 0 */
if (m_timerstate == TIMER_IDLE) if (m_timerstate == TIMER_IDLE)
@ -150,7 +150,7 @@ uint8_t mos6530_device::get_timer()
end_state - callback to process the timer end_state - callback to process the timer
-------------------------------------------------*/ -------------------------------------------------*/
TIMER_CALLBACK_MEMBER(mos6530_device::end_state) TIMER_CALLBACK_MEMBER(mos6530l_device::end_state)
{ {
assert(m_timerstate != TIMER_IDLE); assert(m_timerstate != TIMER_IDLE);
@ -181,7 +181,7 @@ TIMER_CALLBACK_MEMBER(mos6530_device::end_state)
mos6530_w - master I/O write access mos6530_w - master I/O write access
-------------------------------------------------*/ -------------------------------------------------*/
void mos6530_device::write(offs_t offset, uint8_t data) void mos6530l_device::write(offs_t offset, uint8_t data)
{ {
/* if A2 == 1, we are writing to the timer */ /* if A2 == 1, we are writing to the timer */
if (offset & 0x04) if (offset & 0x04)
@ -245,7 +245,7 @@ void mos6530_device::write(offs_t offset, uint8_t data)
mos6530_r - master I/O read access mos6530_r - master I/O read access
-------------------------------------------------*/ -------------------------------------------------*/
uint8_t mos6530_device::read(offs_t offset) uint8_t mos6530l_device::read(offs_t offset)
{ {
uint8_t val; uint8_t val;
@ -309,7 +309,7 @@ uint8_t mos6530_device::read(offs_t offset)
value value
-------------------------------------------------*/ -------------------------------------------------*/
void mos6530_device::porta_in_set(uint8_t data, uint8_t mask) void mos6530l_device::porta_in_set(uint8_t data, uint8_t mask)
{ {
m_port[0].m_in = (m_port[0].m_in & ~mask) | (data & mask); m_port[0].m_in = (m_port[0].m_in & ~mask) | (data & mask);
} }
@ -320,7 +320,7 @@ void mos6530_device::porta_in_set(uint8_t data, uint8_t mask)
value value
-------------------------------------------------*/ -------------------------------------------------*/
void mos6530_device::portb_in_set(uint8_t data, uint8_t mask) void mos6530l_device::portb_in_set(uint8_t data, uint8_t mask)
{ {
m_port[1].m_in = (m_port[1].m_in & ~mask) | (data & mask); m_port[1].m_in = (m_port[1].m_in & ~mask) | (data & mask);
} }
@ -331,7 +331,7 @@ void mos6530_device::portb_in_set(uint8_t data, uint8_t mask)
value value
-------------------------------------------------*/ -------------------------------------------------*/
uint8_t mos6530_device::porta_in_get() uint8_t mos6530l_device::porta_in_get()
{ {
return m_port[0].m_in; return m_port[0].m_in;
} }
@ -342,7 +342,7 @@ uint8_t mos6530_device::porta_in_get()
value value
-------------------------------------------------*/ -------------------------------------------------*/
uint8_t mos6530_device::portb_in_get() uint8_t mos6530l_device::portb_in_get()
{ {
return m_port[1].m_in; return m_port[1].m_in;
} }
@ -353,7 +353,7 @@ uint8_t mos6530_device::portb_in_get()
value value
-------------------------------------------------*/ -------------------------------------------------*/
uint8_t mos6530_device::porta_out_get() uint8_t mos6530l_device::porta_out_get()
{ {
return m_port[0].m_out; return m_port[0].m_out;
} }
@ -364,7 +364,7 @@ uint8_t mos6530_device::porta_out_get()
value value
-------------------------------------------------*/ -------------------------------------------------*/
uint8_t mos6530_device::portb_out_get() uint8_t mos6530l_device::portb_out_get()
{ {
return m_port[1].m_out; return m_port[1].m_out;
} }

View File

@ -29,8 +29,8 @@
**********************************************************************/ **********************************************************************/
#ifndef MAME_MACHINE_MOS6530_H #ifndef MAME_MACHINE_MOS6530L_H
#define MAME_MACHINE_MOS6530_H #define MAME_MACHINE_MOS6530L_H
#pragma once #pragma once
@ -43,10 +43,10 @@
MACROS / CONSTANTS MACROS / CONSTANTS
***************************************************************************/ ***************************************************************************/
class mos6530_device : public device_t class mos6530l_device : public device_t
{ {
public: public:
mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); mos6530l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
auto in_pa_callback() { return m_in_pa_cb.bind(); } auto in_pa_callback() { return m_in_pa_cb.bind(); }
auto out_pa_callback() { return m_out_pa_cb.bind(); } auto out_pa_callback() { return m_out_pa_cb.bind(); }
@ -102,6 +102,6 @@ private:
void portb_in_set(uint8_t data, uint8_t mask); void portb_in_set(uint8_t data, uint8_t mask);
}; };
DECLARE_DEVICE_TYPE(MOS6530, mos6530_device) DECLARE_DEVICE_TYPE(MOS6530L, mos6530l_device)
#endif // MAME_MACHINE_MOS6530_H #endif // MAME_MACHINE_MOS6530L_H