Previous 199869 Revisions Next

r33718 Saturday 6th December, 2014 at 21:23:43 UTC by hap
nothing
[src/emu/cpu/tms0980]tms0980.c tms0980.h

trunk/src/emu/cpu/tms0980/tms0980.c
r242229r242230
129129const device_type TMS1000 = &device_creator<tms1000_cpu_device>; // 28-pin DIP, 11 R pins
130130const device_type TMS1200 = &device_creator<tms1200_cpu_device>; // 40-pin DIP, 13 R pins
131131const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // same as tms1000, just supports higher voltage
132// TMS1270 has 10 O pins, how does that work?
132133
133134// TMS1100 is nearly the same as TMS1000, some different opcodes, and with double the RAM and ROM
134135const device_type TMS1100 = &device_creator<tms1100_cpu_device>; // 28-pin DIP, 11 R pins
r242229r242230
142143// - 16-term output PLA and segment PLA above the RAM
143144const device_type TMS0980 = &device_creator<tms0980_cpu_device>; // 28-pin DIP, 9 R pins
144145
145
146146// TMS0970 is a stripped-down version of the TMS0980, itself acting more like a TMS1000
147147// - 64x4bit RAM array at the bottom-left
148148// - 1024x8bit ROM array at the bottom-right
r242229r242230
152152const device_type TMS0970 = &device_creator<tms0970_cpu_device>; // 28-pin DIP, 11 R pins
153153
154154
155
156155static ADDRESS_MAP_START(program_11bit_9, AS_PROGRAM, 16, tms1xxx_cpu_device)
157156   AM_RANGE(0x000, 0xfff) AM_ROM
158157ADDRESS_MAP_END
r242229r242230
307306   return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options);
308307}
309308
310
311void tms1000_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
309void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
312310{
313311   switch (entry.index())
314312   {
315313      case STATE_GENPC:
316         string.printf("%03X", (m_pa << 6) | m_pc);
314         string.printf("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0));
317315         break;
318316   }
319317}
320318
321void tms1100_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
322{
323   switch (entry.index())
324   {
325      case STATE_GENPC:
326         string.printf("%03X", (m_ca << 10) | (m_pa << 6) | m_pc);
327         break;
328   }
329}
330319
331void tms0980_cpu_device::state_string_export(const device_state_entry &entry, astring &string)
332{
333   switch (entry.index())
334   {
335      case STATE_GENPC:
336         string.printf("%03X", ((m_pa << 7) | m_pc) << 1);
337         break;
338   }
339}
340320
341
342
343321//-------------------------------------------------
344322//  device_start - device-specific startup
345323//-------------------------------------------------
r242229r242230
450428   state_add(TMS0980_Y,      "Y",      m_y     ).formatstr("%01X");
451429   state_add(TMS0980_STATUS, "STATUS", m_status).formatstr("%01X");
452430
453   state_add(STATE_GENPC, "curpc", m_pc).formatstr("%8s").noshow();
431   state_add(STATE_GENPC, "curpc", m_rom_address).formatstr("%03X").noshow();
454432   state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow();
455433
456434   m_icountptr = &m_icount;
trunk/src/emu/cpu/tms0980/tms0980.h
r242229r242230
8080   virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
8181   virtual UINT32 disasm_max_opcode_bytes() const { return 1; }
8282
83   void state_string_export(const device_state_entry &entry, astring &string);
84
8385   void next_pc();
8486   void execute_fixed_opcode();
8587   
r242229r242230
193195   virtual void device_reset();
194196   virtual machine_config_constructor device_mconfig_additions() const;
195197
196   void state_string_export(const device_state_entry &entry, astring &string);
197198
198199   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
199200};
r242229r242230
222223   // overrides
223224   virtual void device_reset();
224225
225   void state_string_export(const device_state_entry &entry, astring &string);
226
227226   virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
228227   
229228   virtual void op_setr();
r242229r242230
264263   // overrides
265264   virtual void device_reset();
266265
267   void state_string_export(const device_state_entry &entry, astring &string);
268266   virtual machine_config_constructor device_mconfig_additions() const;
269267
270268   virtual UINT32 disasm_min_opcode_bytes() const { return 2; }


Previous 199869 Revisions Next


© 1997-2024 The MAME Team