Previous 199869 Revisions Next

r36100 Wednesday 25th February, 2015 at 00:21:57 UTC by hap
added support for defining a 7seg decoder table for AMI S2000
[/branches/kale/src/emu/cpu/amis2000]amis2000.h amis2000op.inc
[/branches/kale/src/emu/cpu/tms0980]tms0980.c tms0980.h
[/branches/kale/src/mess/drivers]tispeak.c

branches/kale/src/emu/cpu/amis2000/amis2000.h
r244611r244612
3434#define MCFG_AMI_S2152_FOUT_CB(_devcb) \
3535   amis2000_base_device::set_write_f_callback(*device, DEVCB_##_devcb);
3636
37// S2000 has a hardcoded 7seg table, that (unlike S2200) is officially
38// uncustomizable, but wildfire proves to be an exception to that rule.
39#define MCFG_AMI_S2000_7SEG_DECODER(_pla) \
40   amis2000_base_device::set_7seg_table(*device, _ptr);
3741
42
3843class amis2000_base_device : public cpu_device
3944{
4045public:
r244611r244612
4651      , m_bu_bits(bu_bits)
4752      , m_callstack_bits(callstack_bits)
4853      , m_callstack_depth(callstack_depth)
54      , m_7seg_table(NULL)
4955      , m_read_k(*this)
5056      , m_read_i(*this)
5157      , m_read_d(*this)
r244611r244612
6167   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); }
6268   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); }
6369   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); }
70   static void set_7seg_table(device_t &device, const UINT8 *ptr) { downcast<amis2000_base_device &>(device).m_7seg_table = ptr; }
6471
6572protected:
6673   // device-level overrides
r244611r244612
115122   UINT16 m_a;                 // 13-bit a-pins latch (master strobe latch)
116123
117124   // i/o handlers
125   const UINT8 *m_7seg_table;
118126   devcb_read8 m_read_k;
119127   devcb_read8 m_read_i;
120128   devcb_read8 m_read_d;
branches/kale/src/emu/cpu/amis2000/amis2000op.inc
r244611r244612
216216      // 0-F digits in bit order [DP]abcdefg
217217      0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b, 0x77, 0x1f, 0x4e, 0x3d, 0x4f, 0x47
218218   };
219   m_d = lut_segment_decoder[m_acc] | (m_carry ? 0x80 : 0x00);
219   const UINT8 *ptr = (m_7seg_table != NULL) ? m_7seg_table : lut_segment_decoder;
220   m_d = ptr[m_acc] | (m_carry ? 0x80 : 0x00);
220221   d_latch_out(true);
221222}
222223
branches/kale/src/emu/cpu/tms0980/tms0980.c
r244611r244612
821821void tms1xxx_cpu_device::write_o_output(UINT8 index)
822822{
823823   // a hardcoded table is supported if the output pla is unknown
824   m_o = (c_output_pla == NULL) ? m_opla->read(index) : c_output_pla[index];
824   m_o = (m_output_pla_table == NULL) ? m_opla->read(index) : m_output_pla_table[index];
825825   m_write_o(0, m_o & m_o_mask, 0xffff);
826826}
827827
branches/kale/src/emu/cpu/tms0980/tms0980.h
r244611r244612
6464      , m_pc_bits(pc_bits)
6565      , m_byte_bits(byte_bits)
6666      , m_x_bits(x_bits)
67      , c_output_pla(NULL)
67      , m_output_pla_table(NULL)
6868      , m_read_k(*this)
6969      , m_write_o(*this)
7070      , m_write_r(*this)
r244611r244612
7676   template<class _Object> static devcb_base &set_write_o_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_o.set_callback(object); }
7777   template<class _Object> static devcb_base &set_write_r_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_write_r.set_callback(object); }
7878   template<class _Object> static devcb_base &set_power_off_callback(device_t &device, _Object object) { return downcast<tms1xxx_cpu_device &>(device).m_power_off.set_callback(object); }
79   static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).c_output_pla = output_pla; }
79   static void set_output_pla(device_t &device, const UINT16 *output_pla) { downcast<tms1xxx_cpu_device &>(device).m_output_pla_table = output_pla; }
8080
8181protected:
8282   // device-level overrides
r244611r244612
185185   address_space *m_program;
186186   address_space *m_data;
187187
188   const UINT16 *c_output_pla;
188   const UINT16 *m_output_pla_table;
189189   devcb_read8 m_read_k;
190190   devcb_write16 m_write_o;
191191   devcb_write16 m_write_r;
branches/kale/src/mess/drivers/tispeak.c
r244611r244612
171171    Touch & Tell (US), 1981
172172    - MCU: CD8012*
173173    - TMS51xx: 4KB CD2610
174    - notes: MCU is TMS1100 instead of TMS0270
174    - notes: MCU is TMS1100 instead of TMS0270. CD8010 is seen in some devices
175      too, maybe an earlier version?
175176
176177    Touch & Tell (UK), 1981
177178    - MCU: ?* (assume same as US version)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team