summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar hap <happppp@users.noreply.github.com>2014-12-06 22:23:43 +0100
committerGravatarGravatar hap <happppp@users.noreply.github.com>2014-12-06 22:23:43 +0100
commit0a02a83c06f3859639dfe6e9700699239b80f2b7 (patch) (github)
tree6074c34dbad89eb6246a82ae2cd12fd541e8f0e3
parente1c921f28e2ef8e3e4bdf49e65cebb5ba726fd71 (diff)
downloadmame-0a02a83c06f3859639dfe6e9700699239b80f2b7.tar.bz2
mame-0a02a83c06f3859639dfe6e9700699239b80f2b7.zip
nothing
-rw-r--r--src/emu/cpu/tms0980/tms0980.c30
-rw-r--r--src/emu/cpu/tms0980/tms0980.h6
2 files changed, 6 insertions, 30 deletions
diff --git a/src/emu/cpu/tms0980/tms0980.c b/src/emu/cpu/tms0980/tms0980.c
index acbad8bf399..35898829fee 100644
--- a/src/emu/cpu/tms0980/tms0980.c
+++ b/src/emu/cpu/tms0980/tms0980.c
@@ -129,6 +129,7 @@ unknown cycle: CME, SSE, SSS
const device_type TMS1000 = &device_creator<tms1000_cpu_device>; // 28-pin DIP, 11 R pins
const device_type TMS1200 = &device_creator<tms1200_cpu_device>; // 40-pin DIP, 13 R pins
const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // same as tms1000, just supports higher voltage
+// TMS1270 has 10 O pins, how does that work?
// TMS1100 is nearly the same as TMS1000, some different opcodes, and with double the RAM and ROM
const device_type TMS1100 = &device_creator<tms1100_cpu_device>; // 28-pin DIP, 11 R pins
@@ -142,7 +143,6 @@ const device_type TMS1300 = &device_creator<tms1300_cpu_device>; // 40-pin DIP,
// - 16-term output PLA and segment PLA above the RAM
const device_type TMS0980 = &device_creator<tms0980_cpu_device>; // 28-pin DIP, 9 R pins
-
// TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000
// - 64x4bit RAM array at the bottom-left
// - 1024x8bit ROM array at the bottom-right
@@ -152,7 +152,6 @@ const device_type TMS0980 = &device_creator<tms0980_cpu_device>; // 28-pin DIP,
const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP, 11 R pins
-
static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1xxx_cpu_device)
AM_RANGE(0x000, 0xfff) AM_ROM
ADDRESS_MAP_END
@@ -307,33 +306,12 @@ offs_t tms0980_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UIN
return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options);
}
-
-void tms1000_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
-{
- switch (entry.index())
- {
- case STATE_GENPC:
- string.printf("%03X", (m_pa << 6) | m_pc);
- break;
- }
-}
-
-void tms1100_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
-{
- switch (entry.index())
- {
- case STATE_GENPC:
- string.printf("%03X", (m_ca << 10) | (m_pa << 6) | m_pc);
- break;
- }
-}
-
-void tms0980_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
+void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
{
switch (entry.index())
{
case STATE_GENPC:
- string.printf("%03X", ((m_pa << 7) | m_pc) << 1);
+ string.printf("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0));
break;
}
}
@@ -450,7 +428,7 @@ void tms1xxx_cpu_device::device_start()
state_add(TMS0980_Y, "Y", m_y ).formatstr("%01X");
state_add(TMS0980_STATUS, "STATUS", m_status).formatstr("%01X");
- state_add(STATE_GENPC, "curpc", m_pc).formatstr("%8s").noshow();
+ state_add(STATE_GENPC, "curpc", m_rom_address).formatstr("%03X").noshow();
state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow();
m_icountptr = &m_icount;
diff --git a/src/emu/cpu/tms0980/tms0980.h b/src/emu/cpu/tms0980/tms0980.h
index 4f00d2b5b74..25556f0121f 100644
--- a/src/emu/cpu/tms0980/tms0980.h
+++ b/src/emu/cpu/tms0980/tms0980.h
@@ -80,6 +80,8 @@ protected:
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
virtual UINT32 disasm_max_opcode_bytes() const { return 1; }
+ void state_string_export(const device_state_entry &entry, astring &string);
+
void next_pc();
void execute_fixed_opcode();
@@ -193,7 +195,6 @@ protected:
virtual void device_reset();
virtual machine_config_constructor device_mconfig_additions() const;
- void state_string_export(const device_state_entry &entry, astring &string);
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
};
@@ -222,8 +223,6 @@ protected:
// overrides
virtual void device_reset();
- void state_string_export(const device_state_entry &entry, astring &string);
-
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
virtual void op_setr();
@@ -264,7 +263,6 @@ protected:
// overrides
virtual void device_reset();
- void state_string_export(const device_state_entry &entry, astring &string);
virtual machine_config_constructor device_mconfig_additions() const;
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }