summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2015-02-16 16:34:54 +0100
committer hap <happppp@users.noreply.github.com>2015-02-16 16:34:54 +0100
commit409b0c9f6d19db9e9d8eaceed63a2139878a79b7 (patch)
tree73a83a2a4a0997d4c8d13804d24812158759163d
parentfe5ebce6a34a79c9c46b3f3cf6cf704bb18f6a65 (diff)
added S2152
-rw-r--r--src/emu/cpu/amis2000/amis2000.c70
-rw-r--r--src/emu/cpu/amis2000/amis2000.h177
-rw-r--r--src/emu/cpu/amis2000/amis2000op.inc114
3 files changed, 188 insertions, 173 deletions
diff --git a/src/emu/cpu/amis2000/amis2000.c b/src/emu/cpu/amis2000/amis2000.c
index 32562bb5e50..3171e0a403f 100644
--- a/src/emu/cpu/amis2000/amis2000.c
+++ b/src/emu/cpu/amis2000/amis2000.c
@@ -6,7 +6,7 @@
Overall functionality is similar to (and probably derived from) NEC uCOM-4.
References:
- - AMI MOS Products Catalog Winter 1979
+ - AMI MOS Products Catalog 1979/1980
- AMI S2000 Programming Manual (rev. 2)
TODO:
@@ -27,71 +27,52 @@
// S2000 is the most basic one, 64 nibbles internal RAM and 1KB internal ROM
// S2150 increased RAM to 80 nibbles and ROM to 1.5KB
// high-voltage output versions of these chips (S2000A and S2150A) are identical overall
-const device_type AMI_S2000 = &device_creator<amis2000_device>;
-const device_type AMI_S2150 = &device_creator<amis2150_device>;
+const device_type AMI_S2000 = &device_creator<amis2000_cpu_device>;
+const device_type AMI_S2150 = &device_creator<amis2150_cpu_device>;
+
+// S2152 is an extension to S2150, removing the K pins and adding a better timer
+const device_type AMI_S2152 = &device_creator<amis2152_cpu_device>;
// internal memory maps
-static ADDRESS_MAP_START(program_1k, AS_PROGRAM, 8, amis2000_device)
+static ADDRESS_MAP_START(program_1k, AS_PROGRAM, 8, amis2000_base_device)
AM_RANGE(0x0000, 0x03ff) AM_ROM
ADDRESS_MAP_END
-static ADDRESS_MAP_START(program_1_5k, AS_PROGRAM, 8, amis2000_device)
+static ADDRESS_MAP_START(program_1_5k, AS_PROGRAM, 8, amis2000_base_device)
AM_RANGE(0x0000, 0x03ff) AM_ROM
AM_RANGE(0x0400, 0x05ff) AM_NOP // 0x00
AM_RANGE(0x0600, 0x07ff) AM_ROM
ADDRESS_MAP_END
-static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, amis2000_device)
+static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, amis2000_base_device)
AM_RANGE(0x00, 0x3f) AM_RAM
ADDRESS_MAP_END
-static ADDRESS_MAP_START(data_80x4, AS_DATA, 8, amis2000_device)
+static ADDRESS_MAP_START(data_80x4, AS_DATA, 8, amis2000_base_device)
AM_RANGE(0x00, 0x3f) AM_RAM
AM_RANGE(0x40, 0x4f) AM_RAM
ADDRESS_MAP_END
// device definitions
-amis2000_device::amis2000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : cpu_device(mconfig, AMI_S2000, "AMI S2000", tag, owner, clock, "amis2000", __FILE__),
- m_program_config("program", ENDIANNESS_BIG, 8, 13, 0, ADDRESS_MAP_NAME(program_1k)),
- m_data_config("data", ENDIANNESS_BIG, 8, 6, 0, ADDRESS_MAP_NAME(data_64x4)),
- m_bu_bits(2),
- m_callstack_bits(10),
- m_callstack_depth(3),
- m_read_k(*this),
- m_read_i(*this),
- m_read_d(*this),
- m_write_d(*this),
- m_write_a(*this)
-{
-}
+amis2000_cpu_device::amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : amis2000_base_device(mconfig, AMI_S2000, "AMI S2000", tag, owner, clock, 2, 10, 3, 13, ADDRESS_MAP_NAME(program_1k), 6, ADDRESS_MAP_NAME(data_64x4), "amis2000", __FILE__)
+{ }
-amis2000_device::amis2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 bu_bits, UINT8 callstack_bits, UINT8 callstack_depth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
- : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
- m_program_config("program", ENDIANNESS_BIG, 8, prgwidth, 0, program),
- m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data),
- m_bu_bits(bu_bits),
- m_callstack_bits(callstack_bits),
- m_callstack_depth(callstack_depth),
- m_read_k(*this),
- m_read_i(*this),
- m_read_d(*this),
- m_write_d(*this),
- m_write_a(*this)
-{
-}
+amis2150_cpu_device::amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : amis2000_base_device(mconfig, AMI_S2150, "AMI S2150", tag, owner, clock, 3, 11, 3, 13, ADDRESS_MAP_NAME(program_1_5k), 7, ADDRESS_MAP_NAME(data_80x4), "amis2150", __FILE__)
+{ }
+
+amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+ : amis2000_base_device(mconfig, AMI_S2152, "AMI S2152", tag, owner, clock, 3, 11, 3, 13, ADDRESS_MAP_NAME(program_1_5k), 7, ADDRESS_MAP_NAME(data_80x4), "amis2152", __FILE__)
+{ }
-amis2150_device::amis2150_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : amis2000_device(mconfig, AMI_S2150, "AMI S2150", tag, owner, clock, 3, 11, 3, 13, ADDRESS_MAP_NAME(program_1_5k), 7, ADDRESS_MAP_NAME(data_80x4), "amis2150", __FILE__)
-{
-}
// disasm
-void amis2000_device::state_string_export(const device_state_entry &entry, astring &string)
+void amis2000_base_device::state_string_export(const device_state_entry &entry, astring &string)
{
switch (entry.index())
{
@@ -110,7 +91,7 @@ void amis2000_device::state_string_export(const device_state_entry &entry, astri
}
}
-offs_t amis2000_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+offs_t amis2000_base_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
{
extern CPU_DISASSEMBLE(amis2000);
return CPU_DISASSEMBLE_NAME(amis2000)(this, buffer, pc, oprom, opram, options);
@@ -128,7 +109,7 @@ enum
S2000_ACC, S2000_E, S2000_CY
};
-void amis2000_device::device_start()
+void amis2000_base_device::device_start()
{
m_program = &space(AS_PROGRAM);
m_data = &space(AS_DATA);
@@ -138,6 +119,7 @@ void amis2000_device::device_start()
m_read_d.resolve_safe(0);
m_write_d.resolve_safe();
m_write_a.resolve_safe();
+ m_write_f.resolve_safe();
m_bu_mask = (1 << m_bu_bits) - 1;
m_callstack_mask = (1 << m_callstack_bits) - 1;
@@ -202,7 +184,7 @@ void amis2000_device::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
-void amis2000_device::device_reset()
+void amis2000_base_device::device_reset()
{
m_pc = 0;
m_op = 0;
@@ -220,7 +202,7 @@ void amis2000_device::device_reset()
// execute
//-------------------------------------------------
-void amis2000_device::execute_run()
+void amis2000_base_device::execute_run()
{
while (m_icount > 0)
{
diff --git a/src/emu/cpu/amis2000/amis2000.h b/src/emu/cpu/amis2000/amis2000.h
index 6eae4738fc3..9fbfc4a09ee 100644
--- a/src/emu/cpu/amis2000/amis2000.h
+++ b/src/emu/cpu/amis2000/amis2000.h
@@ -14,36 +14,53 @@
// generic input pins (4 bits each)
#define MCFG_AMI_S2000_READ_K_CB(_devcb) \
- amis2000_device::set_read_k_callback(*device, DEVCB_##_devcb);
+ amis2000_base_device::set_read_k_callback(*device, DEVCB_##_devcb);
#define MCFG_AMI_S2000_READ_I_CB(_devcb) \
- amis2000_device::set_read_i_callback(*device, DEVCB_##_devcb);
+ amis2000_base_device::set_read_i_callback(*device, DEVCB_##_devcb);
// 8-bit external databus coupled as input/output pins
#define MCFG_AMI_S2000_READ_D_CB(_devcb) \
- amis2000_device::set_read_d_callback(*device, DEVCB_##_devcb);
+ amis2000_base_device::set_read_d_callback(*device, DEVCB_##_devcb);
#define MCFG_AMI_S2000_WRITE_D_CB(_devcb) \
- amis2000_device::set_write_d_callback(*device, DEVCB_##_devcb);
+ amis2000_base_device::set_write_d_callback(*device, DEVCB_##_devcb);
// 13-bit external addressbus coupled as output pins
#define MCFG_AMI_S2000_WRITE_A_CB(_devcb) \
- amis2000_device::set_write_a_callback(*device, DEVCB_##_devcb);
+ amis2000_base_device::set_write_a_callback(*device, DEVCB_##_devcb);
+// F_out pin (only for S2152)
+#define MCFG_AMI_S2152_FOUT_CB(_devcb) \
+ amis2000_base_device::set_write_f_callback(*device, DEVCB_##_devcb);
-class amis2000_device : public cpu_device
+
+class amis2000_base_device : public cpu_device
{
public:
// construction/destruction
- amis2000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- amis2000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 bu_bits, UINT8 callstack_bits, UINT8 callstack_depth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source);
+ amis2000_base_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 bu_bits, UINT8 callstack_bits, UINT8 callstack_depth, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
+ : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
+ , m_program_config("program", ENDIANNESS_BIG, 8, prgwidth, 0, program)
+ , m_data_config("data", ENDIANNESS_BIG, 8, datawidth, 0, data)
+ , m_bu_bits(bu_bits)
+ , m_callstack_bits(callstack_bits)
+ , m_callstack_depth(callstack_depth)
+ , m_read_k(*this)
+ , m_read_i(*this)
+ , m_read_d(*this)
+ , m_write_d(*this)
+ , m_write_a(*this)
+ , m_write_f(*this)
+ { }
// static configuration helpers
- template<class _Object> static devcb_base &set_read_k_callback(device_t &device, _Object object) { return downcast<amis2000_device &>(device).m_read_k.set_callback(object); }
- template<class _Object> static devcb_base &set_read_i_callback(device_t &device, _Object object) { return downcast<amis2000_device &>(device).m_read_i.set_callback(object); }
- template<class _Object> static devcb_base &set_read_d_callback(device_t &device, _Object object) { return downcast<amis2000_device &>(device).m_read_d.set_callback(object); }
- template<class _Object> static devcb_base &set_write_d_callback(device_t &device, _Object object) { return downcast<amis2000_device &>(device).m_write_d.set_callback(object); }
- template<class _Object> static devcb_base &set_write_a_callback(device_t &device, _Object object) { return downcast<amis2000_device &>(device).m_write_a.set_callback(object); }
+ template<class _Object> static devcb_base &set_read_k_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_read_k.set_callback(object); }
+ template<class _Object> static devcb_base &set_read_i_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_read_i.set_callback(object); }
+ template<class _Object> static devcb_base &set_read_d_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_read_d.set_callback(object); }
+ template<class _Object> static devcb_base &set_write_d_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_write_d.set_callback(object); }
+ template<class _Object> static devcb_base &set_write_a_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_write_a.set_callback(object); }
+ template<class _Object> static devcb_base &set_write_f_callback(device_t &device, _Object object) { return downcast<amis2000_base_device &>(device).m_write_f.set_callback(object); }
protected:
// device-level overrides
@@ -103,6 +120,7 @@ protected:
devcb_read8 m_read_d;
devcb_write8 m_write_d;
devcb_write16 m_write_a;
+ devcb_write_line m_write_f;
// misc internal helpers
UINT8 ram_r();
@@ -112,76 +130,91 @@ protected:
void d_latch_out(bool active);
// opcode handlers
- void op_lai();
- void op_lab();
- void op_lae();
- void op_xab();
- void op_xabu();
- void op_xae();
- void op_lbe();
- void op_lbep();
- void op_lbz();
- void op_lbf();
-
- void op_lam();
- void op_xc();
- void op_xci();
- void op_xcd();
- void op_stm();
- void op_rsm();
-
- void op_inp();
- void op_out();
- void op_disb();
- void op_disn();
- void op_mvs();
- void op_psh();
- void op_psl();
- void op_eur();
-
- void op_pp();
- void op_jmp();
- void op_jms();
- void op_rt();
- void op_rts();
- void op_nop();
- void op_halt();
-
- void op_szc();
- void op_szm();
- void op_szi();
- void op_szk();
- void op_sbe();
- void op_sam();
- void op_sos();
- void op_tf1();
- void op_tf2();
-
- void op_adcs();
- void op_adis();
- void op_add();
- void op_and();
- void op_xor();
- void op_stc();
- void op_rsc();
- void op_cma();
- void op_sf1();
- void op_rf1();
- void op_sf2();
- void op_rf2();
+ virtual void op_lai();
+ virtual void op_lab();
+ virtual void op_lae();
+ virtual void op_xab();
+ virtual void op_xabu();
+ virtual void op_xae();
+ virtual void op_lbe();
+ virtual void op_lbep();
+ virtual void op_lbz();
+ virtual void op_lbf();
+
+ virtual void op_lam();
+ virtual void op_xc();
+ virtual void op_xci();
+ virtual void op_xcd();
+ virtual void op_stm();
+ virtual void op_rsm();
+
+ virtual void op_inp();
+ virtual void op_out();
+ virtual void op_disb();
+ virtual void op_disn();
+ virtual void op_mvs();
+ virtual void op_psh();
+ virtual void op_psl();
+ virtual void op_eur();
+
+ virtual void op_pp();
+ virtual void op_jmp();
+ virtual void op_jms();
+ virtual void op_rt();
+ virtual void op_rts();
+ virtual void op_nop();
+ virtual void op_halt();
+
+ virtual void op_szc();
+ virtual void op_szm();
+ virtual void op_szi();
+ virtual void op_szk();
+ virtual void op_sbe();
+ virtual void op_sam();
+ virtual void op_sos();
+ virtual void op_tf1();
+ virtual void op_tf2();
+
+ virtual void op_adcs();
+ virtual void op_adis();
+ virtual void op_add();
+ virtual void op_and();
+ virtual void op_xor();
+ virtual void op_stc();
+ virtual void op_rsc();
+ virtual void op_cma();
+ virtual void op_sf1();
+ virtual void op_rf1();
+ virtual void op_sf2();
+ virtual void op_rf2();
+};
+
+
+class amis2000_cpu_device : public amis2000_base_device
+{
+public:
+ amis2000_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+};
+
+
+class amis2150_cpu_device : public amis2000_base_device
+{
+public:
+ amis2150_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
-class amis2150_device : public amis2000_device
+class amis2152_cpu_device : public amis2000_base_device
{
public:
- amis2150_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ amis2152_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
extern const device_type AMI_S2000;
extern const device_type AMI_S2150;
+extern const device_type AMI_S2152;
#endif /* _AMIS2000_H_ */
diff --git a/src/emu/cpu/amis2000/amis2000op.inc b/src/emu/cpu/amis2000/amis2000op.inc
index 08be8a32177..b9e6c2753c4 100644
--- a/src/emu/cpu/amis2000/amis2000op.inc
+++ b/src/emu/cpu/amis2000/amis2000op.inc
@@ -2,33 +2,33 @@
// internal helpers
-inline UINT8 amis2000_device::ram_r()
+inline UINT8 amis2000_base_device::ram_r()
{
UINT16 address = m_bu << 4 | m_bl;
return m_data->read_byte(address) & 0xf;
}
-inline void amis2000_device::ram_w(UINT8 data)
+inline void amis2000_base_device::ram_w(UINT8 data)
{
UINT16 address = m_bu << 4 | m_bl;
m_data->write_byte(address, data & 0xf);
}
-void amis2000_device::pop_callstack()
+void amis2000_base_device::pop_callstack()
{
m_pc = (m_pc & ~m_callstack_mask) | (m_callstack[0] & m_callstack_mask);
for (int i = 0; i < m_callstack_depth-1; i++)
m_callstack[i] = m_callstack[i+1];
}
-void amis2000_device::push_callstack()
+void amis2000_base_device::push_callstack()
{
for (int i = m_callstack_depth-1; i >= 1; i--)
m_callstack[i] = m_callstack[i-1];
m_callstack[0] = m_pc & m_callstack_mask;
}
-void amis2000_device::d_latch_out(bool active)
+void amis2000_base_device::d_latch_out(bool active)
{
m_write_d(0, active ? (m_d ^ m_d_polarity) : 0, 0xff);
m_d_active = active;
@@ -37,7 +37,7 @@ void amis2000_device::d_latch_out(bool active)
// Register Instructions
-void amis2000_device::op_lai()
+void amis2000_base_device::op_lai()
{
// LAI X: load ACC with X, select I and K inputs
// note: only execute the first one in a sequence of LAI
@@ -49,19 +49,19 @@ void amis2000_device::op_lai()
}
}
-void amis2000_device::op_lab()
+void amis2000_base_device::op_lab()
{
// LAB: load ACC with BL
m_acc = m_bl;
}
-void amis2000_device::op_lae()
+void amis2000_base_device::op_lae()
{
// LAE: load ACC with E
m_acc = m_e;
}
-void amis2000_device::op_xab()
+void amis2000_base_device::op_xab()
{
// XAB: exchange ACC with BL
UINT8 old_acc = m_acc;
@@ -69,7 +69,7 @@ void amis2000_device::op_xab()
m_bl = old_acc;
}
-void amis2000_device::op_xabu()
+void amis2000_base_device::op_xabu()
{
// XABU: exchange ACC with BU
UINT8 old_acc = m_acc;
@@ -77,7 +77,7 @@ void amis2000_device::op_xabu()
m_bu = old_acc & m_bu_mask;
}
-void amis2000_device::op_xae()
+void amis2000_base_device::op_xae()
{
// XAE: exchange ACC with E
UINT8 old_acc = m_acc;
@@ -85,7 +85,7 @@ void amis2000_device::op_xae()
m_e = old_acc;
}
-void amis2000_device::op_lbe()
+void amis2000_base_device::op_lbe()
{
// LBE Y: load BU with Y, load BL with E
// note: only execute the first one in a sequence of LB*
@@ -97,7 +97,7 @@ void amis2000_device::op_lbe()
}
}
-void amis2000_device::op_lbep()
+void amis2000_base_device::op_lbep()
{
// LBEP Y: load BU with Y, load BL with E+1
// note: only execute the first one in a sequence of LB*
@@ -109,7 +109,7 @@ void amis2000_device::op_lbep()
}
}
-void amis2000_device::op_lbz()
+void amis2000_base_device::op_lbz()
{
// LBZ Y: load BU with Y, load BL with 0
// note: only execute the first one in a sequence of LB*
@@ -121,7 +121,7 @@ void amis2000_device::op_lbz()
}
}
-void amis2000_device::op_lbf()
+void amis2000_base_device::op_lbf()
{
// LBF Y: load BU with Y, load BL with 15
// note: only execute the first one in a sequence of LB*
@@ -136,7 +136,7 @@ void amis2000_device::op_lbf()
// RAM Instructions
-void amis2000_device::op_lam()
+void amis2000_base_device::op_lam()
{
// LAM _Y: load ACC with RAM, xor BU with _Y
m_acc = ram_r();
@@ -144,7 +144,7 @@ void amis2000_device::op_lam()
m_bu ^= (param & m_bu_mask);
}
-void amis2000_device::op_xc()
+void amis2000_base_device::op_xc()
{
// XC _Y: exchange ACC with RAM, xor BU with _Y
UINT8 old_acc = m_acc;
@@ -154,7 +154,7 @@ void amis2000_device::op_xc()
m_bu ^= (param & m_bu_mask);
}
-void amis2000_device::op_xci()
+void amis2000_base_device::op_xci()
{
// XCI _Y: exchange ACC with RAM, increment BL(skip next on carry), xor BU with _Y
op_xc();
@@ -162,7 +162,7 @@ void amis2000_device::op_xci()
m_skip = (m_bl == 0);
}
-void amis2000_device::op_xcd()
+void amis2000_base_device::op_xcd()
{
// XCD _Y: exchange ACC with RAM, decrement BL(skip next on carry), xor BU with _Y
op_xc();
@@ -170,14 +170,14 @@ void amis2000_device::op_xcd()
m_skip = (m_bl == 0xf);
}
-void amis2000_device::op_stm()
+void amis2000_base_device::op_stm()
{
// STM Z: set RAM bit Z
UINT8 param = 1 << (m_op & 0x03);
ram_w(ram_r() | param);
}
-void amis2000_device::op_rsm()
+void amis2000_base_device::op_rsm()
{
// RSM Z: reset RAM bit Z
UINT8 param = 1 << (m_op & 0x03);
@@ -187,7 +187,7 @@ void amis2000_device::op_rsm()
// Input/Output Instructions
-void amis2000_device::op_inp()
+void amis2000_base_device::op_inp()
{
// INP: input D-pins to ACC and RAM
UINT8 in = m_d_active ? m_d : m_read_d(0, 0xff);
@@ -195,20 +195,20 @@ void amis2000_device::op_inp()
ram_w(in >> 4 & 0xf);
}
-void amis2000_device::op_out()
+void amis2000_base_device::op_out()
{
// OUT: pulse output ACC and RAM to D-pins
logerror("%s unknown opcode $%02X at $%04X\n", tag(), m_op, m_pc);
}
-void amis2000_device::op_disb()
+void amis2000_base_device::op_disb()
{
// DISB: set D-latch to ACC and RAM directly
m_d = m_acc | ram_r() << 4;
d_latch_out(true);
}
-void amis2000_device::op_disn()
+void amis2000_base_device::op_disn()
{
// DISN: set D-latch to ACC+carry via on-die segment decoder
static const UINT8 lut_segment_decoder[0x10] =
@@ -220,14 +220,14 @@ void amis2000_device::op_disn()
d_latch_out(true);
}
-void amis2000_device::op_mvs()
+void amis2000_base_device::op_mvs()
{
// MVS: output master strobe latch to A-pins
d_latch_out(false);
m_write_a(0, m_a, 0xffff);
}
-void amis2000_device::op_psh()
+void amis2000_base_device::op_psh()
{
// PSH: preset high(BL) master strobe latch
switch (m_bl)
@@ -254,7 +254,7 @@ void amis2000_device::op_psh()
}
}
-void amis2000_device::op_psl()
+void amis2000_base_device::op_psl()
{
// PSL: preset low(BL) master strobe latch
switch (m_bl)
@@ -281,7 +281,7 @@ void amis2000_device::op_psl()
}
}
-void amis2000_device::op_eur()
+void amis2000_base_device::op_eur()
{
// EUR: set timer frequency(European) and D-latch polarity, via ACC
m_d_polarity = (m_acc & 1) ? 0x00 : 0xff;
@@ -291,7 +291,7 @@ void amis2000_device::op_eur()
// Program Control Instructions
-void amis2000_device::op_pp()
+void amis2000_base_device::op_pp()
{
// PP _X: prepare page/bank with _X
UINT8 param = ~m_op & 0x0f;
@@ -301,7 +301,7 @@ void amis2000_device::op_pp()
m_pbr = param & 7;
}
-void amis2000_device::op_jmp()
+void amis2000_base_device::op_jmp()
{
// JMP X: jump to X(+PP)
UINT16 mask = 0x3f;
@@ -316,7 +316,7 @@ void amis2000_device::op_jmp()
m_pc = (m_pc & ~mask) | param;
}
-void amis2000_device::op_jms()
+void amis2000_base_device::op_jms()
{
// JMS X: call to X(+PP)
m_icount--;
@@ -328,25 +328,25 @@ void amis2000_device::op_jms()
m_pc |= 0x3c0;
}
-void amis2000_device::op_rt()
+void amis2000_base_device::op_rt()
{
// RT: return from subroutine
pop_callstack();
}
-void amis2000_device::op_rts()
+void amis2000_base_device::op_rts()
{
// RTS: return from subroutine and skip next
op_rt();
m_skip = true;
}
-void amis2000_device::op_nop()
+void amis2000_base_device::op_nop()
{
// NOP: no operation
}
-void amis2000_device::op_halt()
+void amis2000_base_device::op_halt()
{
// HALT: debugger breakpoint for devkit-use
logerror("%s unknown opcode $%02X at $%04X\n", tag(), m_op, m_pc);
@@ -355,56 +355,56 @@ void amis2000_device::op_halt()
// Skip Instructions
-void amis2000_device::op_szc()
+void amis2000_base_device::op_szc()
{
// SZC: skip next on zero(no) carry
m_skip = !m_carry;
}
-void amis2000_device::op_szm()
+void amis2000_base_device::op_szm()
{
// SZM Z: skip next on zero RAM bit Z
UINT8 param = 1 << (m_op & 0x03);
m_skip = !(ram_r() & param);
}
-void amis2000_device::op_szi()
+void amis2000_base_device::op_szi()
{
// SZI: skip next on I pin(s)
m_skip = ((~m_read_i(0, 0xff) & m_ki_mask) != 0);
}
-void amis2000_device::op_szk()
+void amis2000_base_device::op_szk()
{
// SZK: skip next on K pin(s)
m_skip = ((~m_read_k(0, 0xff) & m_ki_mask) != 0);
}
-void amis2000_device::op_sbe()
+void amis2000_base_device::op_sbe()
{
// SBE: skip next on BL equals E
m_skip = (m_bl == m_e);
}
-void amis2000_device::op_sam()
+void amis2000_base_device::op_sam()
{
// SAM: skip next on ACC equals RAM
m_skip = (m_acc == ram_r());
}
-void amis2000_device::op_sos()
+void amis2000_base_device::op_sos()
{
// SOS: skip next on SF(timer output), clear SF
logerror("%s unknown opcode $%02X at $%04X\n", tag(), m_op, m_pc);
}
-void amis2000_device::op_tf1()
+void amis2000_base_device::op_tf1()
{
// TF1: skip next on flag 1
m_skip = ((m_f & 0x01) != 0);
}
-void amis2000_device::op_tf2()
+void amis2000_base_device::op_tf2()
{
// TF2: skip next on flag 2
m_skip = ((m_f & 0x02) != 0);
@@ -413,7 +413,7 @@ void amis2000_device::op_tf2()
// Arithmetic and Logical Instructions
-void amis2000_device::op_adcs()
+void amis2000_base_device::op_adcs()
{
// ADCS: add RAM to ACC+carry, skip next on not carry
m_acc += ram_r() + m_carry;
@@ -422,7 +422,7 @@ void amis2000_device::op_adcs()
m_acc &= 0xf;
}
-void amis2000_device::op_adis()
+void amis2000_base_device::op_adis()
{
// ADIS X: add X to ACC, skip next on not carry
UINT8 param = m_op & 0x0f;
@@ -431,61 +431,61 @@ void amis2000_device::op_adis()
m_acc &= 0xf;
}
-void amis2000_device::op_add()
+void amis2000_base_device::op_add()
{
// ADD: add RAM to ACC
m_acc = (m_acc + ram_r()) & 0xf;
}
-void amis2000_device::op_and()
+void amis2000_base_device::op_and()
{
// AND: and ACC with RAM
m_acc &= ram_r();
}
-void amis2000_device::op_xor()
+void amis2000_base_device::op_xor()
{
// XOR: xor ACC with RAM
m_acc ^= ram_r();
}
-void amis2000_device::op_stc()
+void amis2000_base_device::op_stc()
{
// STC: set carry
m_carry = 1;
}
-void amis2000_device::op_rsc()
+void amis2000_base_device::op_rsc()
{
// RSC: reset carry
m_carry = 0;
}
-void amis2000_device::op_cma()
+void amis2000_base_device::op_cma()
{
// CMA: complement ACC
m_acc ^= 0xf;
}
-void amis2000_device::op_sf1()
+void amis2000_base_device::op_sf1()
{
// SF1: set flag 1
m_f |= 0x01;
}
-void amis2000_device::op_rf1()
+void amis2000_base_device::op_rf1()
{
// RF1: reset flag 1
m_f &= ~0x01;
}
-void amis2000_device::op_sf2()
+void amis2000_base_device::op_sf2()
{
// SF2: set flag 2
m_f |= 0x02;
}
-void amis2000_device::op_rf2()
+void amis2000_base_device::op_rf2()
{
// RF2: reset flag 2
m_f &= ~0x02;