Previous 199869 Revisions Next

r26921 Friday 3rd January, 2014 at 19:35:59 UTC by Dirk Best
px4.c: preliminary tf20 floppy support
[src/mess/drivers]hx20.c px4.c
[src/mess/includes]hx20.h
[src/mess/machine]epson_sio.c epson_sio.h tf20.c tf20.h

trunk/src/mess/machine/tf20.c
r26920r26921
77
88    Dual 5.25" floppy drive with HX-20 factory option
99
10    Status: Issues with new uPD765, missing uPD7201 emulation.
10    Status: Needs testing.
1111
1212    http://fjkraan.home.xs4all.nl/comp/tf20/index.html
1313
r26920r26921
2525
2626const device_type EPSON_TF20 = &device_creator<epson_tf20_device>;
2727
28
2928//-------------------------------------------------
3029//  address maps
3130//-------------------------------------------------
r26920r26921
4544   AM_RANGE(0xfa, 0xfb) AM_DEVICE("5a", upd765a_device, map)
4645ADDRESS_MAP_END
4746
48
4947//-------------------------------------------------
5048//  rom_region - device-specific ROM region
5149//-------------------------------------------------
r26920r26921
6058   return ROM_NAME( tf20 );
6159}
6260
63
6461//-------------------------------------------------
6562//  input_ports - device-specific input ports
6663//-------------------------------------------------
6764
6865INPUT_PORTS_START( tf20 )
6966   PORT_START("tf20_dip")
70   PORT_DIPNAME(0x0f, 0x0f, "Drive extension")
71   PORT_DIPLOCATION("TF-20 TFX:8,7,6,5")
72   PORT_DIPSETTING(0x0f, "A & B Drive")
73   PORT_DIPSETTING(0x07, "C & D Drive")
67   PORT_DIPNAME(0x0f, 0x00, "Drive extension")
68   PORT_DIPLOCATION("TF-20:8,7,6,5")
69   PORT_DIPSETTING(0x00, "A & B Drive")
70   PORT_DIPSETTING(0x01, "C & D Drive")
7471INPUT_PORTS_END
7572
7673ioport_constructor epson_tf20_device::device_input_ports() const
r26920r26921
7875   return INPUT_PORTS_NAME( tf20 );
7976}
8077
81
8278//-------------------------------------------------
8379//  machine_config_additions - device-specific
8480//  machine configurations
r26920r26921
8682
8783static UPD7201_INTERFACE( tf20_upd7201_intf )
8884{
89   XTAL_CR2 / 128, XTAL_CR2 / 128, XTAL_CR2 / 128, XTAL_CR2 / 128,
85   0, 0, 0, 0,
9086
87   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, epson_tf20_device, txda_w),
88   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, epson_tf20_device, dtra_w),
9189   DEVCB_NULL,
9290   DEVCB_NULL,
9391   DEVCB_NULL,
94   DEVCB_NULL,
95   DEVCB_NULL,
9692
9793   DEVCB_NULL,
9894   DEVCB_NULL,
r26920r26921
132128
133129   // serial interface to another device
134130   MCFG_EPSON_SIO_ADD("sio", NULL)
131   MCFG_EPSON_SIO_RX(DEVWRITELINE(DEVICE_SELF, epson_tf20_device, rxc_w))
132   MCFG_EPSON_SIO_PIN(DEVWRITELINE(DEVICE_SELF, epson_tf20_device, pinc_w))
135133MACHINE_CONFIG_END
136134
137135machine_config_constructor epson_tf20_device::device_mconfig_additions() const
r26920r26921
155153   m_ram(*this, "ram"),
156154   m_fdc(*this, "5a"),
157155   m_mpsc(*this, "3a"),
158   m_sio(*this, "sio")
156   m_sio_output(*this, "sio"),
157   m_rxc(1)
159158{
159   m_sio_input = dynamic_cast<epson_sio_device *>(owner);
160160}
161161
162
163162//-------------------------------------------------
164163//  device_start - device-specific startup
165164//-------------------------------------------------
r26920r26921
185184
186185}
187186
188
189187//-------------------------------------------------
190188//  device_reset - device-specific reset
191189//-------------------------------------------------
r26920r26921
193191void epson_tf20_device::device_reset()
194192{
195193   // init timers
196   m_timer_serial->adjust(attotime::from_hz(XTAL_CR2 / 128), 0, attotime::from_hz(XTAL_CR2 / 128));
194   m_timer_serial->adjust(attotime::zero, 0, attotime::from_hz(XTAL_CR2 / 8));
197195   m_timer_tc->adjust(attotime::never);
198196
197   m_mpsc->rxa_w(1);
198   m_mpsc->rxb_w(1);
199
199200   // enable rom
200201   m_cpu->space(AS_PROGRAM).install_rom(0x0000, 0x07ff, 0, 0x7800, memregion("rom")->base());
201202}
202203
203
204204//-------------------------------------------------
205205//  device_timer - handler timer events
206206//-------------------------------------------------
r26920r26921
211211   {
212212   case 0:
213213      m_mpsc->rxca_w(1);
214      m_mpsc->rxca_w(0);
214215      m_mpsc->txca_w(1);
216      m_mpsc->txca_w(0);
215217      m_mpsc->rxcb_w(1);
218      m_mpsc->rxcb_w(0);
216219      m_mpsc->txcb_w(1);
220      m_mpsc->txcb_w(0);
217221      break;
218222
219223   case 1:
r26920r26921
224228}
225229
226230
231//**************************************************************************
232//  CPU & MEMORY
233//**************************************************************************
234
227235//-------------------------------------------------
228236//  irq vector callback
229237//-------------------------------------------------
r26920r26921
233241   return 0x00;
234242}
235243
244// a read from this location disables the rom
245READ8_MEMBER( epson_tf20_device::rom_disable_r )
246{
247   // switch in ram
248   m_cpu->space(AS_PROGRAM).install_ram(0x0000, 0x7fff, m_ram->pointer());
249   return 0xff;
250}
236251
252
253//**************************************************************************
254//  FLOPPY DISK CONTROLLER
255//**************************************************************************
256
237257//-------------------------------------------------
238258//  fdc interrupt
239259//-------------------------------------------------
r26920r26921
243263   m_cpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
244264}
245265
266READ8_MEMBER( epson_tf20_device::upd765_tc_r )
267{
268   logerror("%s: upd765_tc_r\n", space.machine().describe_context());
246269
247//-------------------------------------------------
248//  tx_w
249//-------------------------------------------------
270   // toggle tc on read
271   m_fdc->tc_w(true);
272   m_timer_tc->adjust(attotime::zero);
250273
251void epson_tf20_device::tx_w(int level)
274   return 0xff;
275}
276
277WRITE8_MEMBER( epson_tf20_device::fdc_control_w )
252278{
253   logerror("%s: tx_w(%d)\n", tag(), level);
254   //m_mpsc->rxda_w(level);
279   logerror("%s: tf20_fdc_control_w(%02x)\n", space.machine().describe_context(), data);
280
281   // bit 0, motor on signal
282   m_fd0->mon_w(!BIT(data, 0));
283   m_fd1->mon_w(!BIT(data, 0));
255284}
256285
257286
287//**************************************************************************
288//  SIO INTERFACE
289//**************************************************************************
290
258291//-------------------------------------------------
259//  pout_w
292//  rxc_w - rx input
260293//-------------------------------------------------
261294
262void epson_tf20_device::pout_w(int level)
295WRITE_LINE_MEMBER( epson_tf20_device::rxc_w )
263296{
264   logerror("%s: pout_w(%d)\n", tag(), level);
265   m_mpsc->ctsa_w(level);
297   m_rxc = state;
298   m_sio_input->rx_w(m_txda & m_rxc);
266299}
267300
268
269301//-------------------------------------------------
270//  rx_r
302//  pinc_w - pin input
271303//-------------------------------------------------
272304
273int epson_tf20_device::rx_r()
305WRITE_LINE_MEMBER( epson_tf20_device::pinc_w )
274306{
275   logerror("%s: rx_r\n", tag());
276   return 1;//m_mpsc->txda_r();
307   m_pinc = state;
308   m_sio_input->pin_w(!m_dtra | m_pinc);
277309}
278310
279
280311//-------------------------------------------------
281//  pin_r
312//  txda_w - rx output
282313//-------------------------------------------------
283314
284int epson_tf20_device::pin_r()
315WRITE_LINE_MEMBER( epson_tf20_device::txda_w )
285316{
286   logerror("%s: pin_r\n", tag());
287   return 1;//m_mpsc->dtra_r();
317   m_txda = state;
318   m_sio_input->rx_w(m_txda & m_rxc);
288319}
289320
321//-------------------------------------------------
322//  dtra_w - pin output
323//-------------------------------------------------
290324
291// a read from this location disables the rom
292READ8_MEMBER( epson_tf20_device::rom_disable_r )
325WRITE_LINE_MEMBER( epson_tf20_device::dtra_w )
293326{
294   // switch in ram
295   m_cpu->space(AS_PROGRAM).install_ram(0x0000, 0x7fff, m_ram->pointer());
296   return 0xff;
327   m_dtra = state;
328   m_sio_input->pin_w(!m_dtra | m_pinc);
297329}
298330
331//-------------------------------------------------
332//  tx_w - tx input
333//-------------------------------------------------
299334
300READ8_MEMBER( epson_tf20_device::upd765_tc_r )
335void epson_tf20_device::tx_w(int level)
301336{
302   logerror("%s: upd765_tc_r\n", space.machine().describe_context());
303
304   // toggle tc on read
305   m_fdc->tc_w(true);
306   m_timer_tc->adjust(attotime::zero);
307
308   return 0xff;
337   m_mpsc->rxa_w(level);
338   m_sio_output->tx_w(level);
309339}
310340
341//-------------------------------------------------
342//  pout_w - pout input
343//-------------------------------------------------
311344
312WRITE8_MEMBER( epson_tf20_device::fdc_control_w )
345void epson_tf20_device::pout_w(int level)
313346{
314   logerror("%s: tf20_fdc_control_w(%02x)\n", space.machine().describe_context(), data);
315
316   // bit 0, motor on signal
317   m_fd0->mon_w(!BIT(data, 0));
318   m_fd1->mon_w(!BIT(data, 0));
347   m_mpsc->ctsa_w(!level);
348   m_sio_output->pout_w(level);
319349}
trunk/src/mess/machine/tf20.h
r26920r26921
4343   DECLARE_READ8_MEMBER( upd765_tc_r );
4444   DECLARE_WRITE8_MEMBER( fdc_control_w );
4545   IRQ_CALLBACK_MEMBER( irq_callback );
46   DECLARE_WRITE_LINE_MEMBER( txda_w );
47   DECLARE_WRITE_LINE_MEMBER( dtra_w );
4648
49   // from sio output
50   DECLARE_WRITE_LINE_MEMBER( rxc_w );
51   DECLARE_WRITE_LINE_MEMBER( pinc_w );
52
4753   void fdc_irq(bool state);
4854
4955protected:
r26920r26921
5359   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
5460
5561   // device_epson_sio_interface overrides
56   virtual int rx_r();
57   virtual int pin_r();
5862   virtual void tx_w(int level);
5963   virtual void pout_w(int level);
6064
r26920r26921
6367   required_device<ram_device> m_ram;
6468   required_device<upd765a_device> m_fdc;
6569   required_device<upd7201_device> m_mpsc;
66   required_device<epson_sio_device> m_sio;
70   required_device<epson_sio_device> m_sio_output;
6771
6872   floppy_image_device *m_fd0;
6973   floppy_image_device *m_fd1;
r26920r26921
7175   emu_timer *m_timer_serial;
7276   emu_timer *m_timer_tc;
7377
78   int m_rxc;
79   int m_txda;
80   int m_dtra;
81   int m_pinc;
82
83   epson_sio_device *m_sio_input;
84
7485   static const int XTAL_CR1 = XTAL_8MHz;
7586   static const int XTAL_CR2 = XTAL_4_9152MHz;
7687};
trunk/src/mess/machine/epson_sio.c
r26920r26921
2929//  device_epson_sio_interface - constructor
3030//-------------------------------------------------
3131
32device_epson_sio_interface::device_epson_sio_interface(const machine_config &mconfig, device_t &device)
33   : device_slot_card_interface(mconfig,device)
32device_epson_sio_interface::device_epson_sio_interface(const machine_config &mconfig, device_t &device) :
33   device_slot_card_interface(mconfig, device)
3434{
3535   m_slot = dynamic_cast<epson_sio_device *>(device.owner());
3636}
r26920r26921
5555
5656epson_sio_device::epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
5757      device_t(mconfig, EPSON_SIO, "EPSON SIO port", tag, owner, clock, "epson_sio", __FILE__),
58      device_slot_interface(mconfig, *this)
58      device_slot_interface(mconfig, *this),
59      m_write_rx(*this),
60      m_write_pin(*this)
5961{
6062}
6163
r26920r26921
7678void epson_sio_device::device_start()
7779{
7880   m_cart = dynamic_cast<device_epson_sio_interface *>(get_card_device());
81
82   m_write_rx.resolve_safe();
83   m_write_pin.resolve_safe();
7984}
8085
8186
r26920r26921
100105      m_cart->pout_w(state);
101106}
102107
103READ_LINE_MEMBER( epson_sio_device::rx_r )
104{
105   int state = 1;
106108
107   if (m_cart != NULL)
108      state = m_cart->rx_r();
109
110   return state;
111}
112
113READ_LINE_MEMBER( epson_sio_device::pin_r )
114{
115   int state = 1;
116
117   if (m_cart != NULL)
118      state = m_cart->pin_r();
119
120   return state;
121}
122
123
124109//**************************************************************************
125110//  SLOT INTERFACE
126111//**************************************************************************
trunk/src/mess/machine/epson_sio.h
r26920r26921
2323   MCFG_DEVICE_ADD(_tag, EPSON_SIO, 0) \
2424   MCFG_DEVICE_SLOT_INTERFACE(epson_sio_devices, _def_slot, false)
2525
26#define MCFG_EPSON_SIO_RX(_rx) \
27   downcast<epson_sio_device *>(device)->set_rx_callback(DEVCB2_##_rx);
2628
29#define MCFG_EPSON_SIO_PIN(_pin) \
30   downcast<epson_sio_device *>(device)->set_pin_callback(DEVCB2_##_pin);
31
32
2733//**************************************************************************
2834//  TYPE DEFINITIONS
2935//**************************************************************************
r26920r26921
3945   epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4046   virtual ~epson_sio_device();
4147
42   DECLARE_READ_LINE_MEMBER(rx_r);
43   DECLARE_READ_LINE_MEMBER(pin_r);
48   // callbacks
49   template<class _rx> void set_rx_callback(_rx rx) { m_write_rx.set_callback(rx); }
50   template<class _pin> void set_pin_callback(_pin pin) { m_write_pin.set_callback(pin); }
4451
45   DECLARE_WRITE_LINE_MEMBER(tx_w);
46   DECLARE_WRITE_LINE_MEMBER(pout_w);
52   // called from owner
53   DECLARE_WRITE_LINE_MEMBER( tx_w );
54   DECLARE_WRITE_LINE_MEMBER( pout_w );
4755
56   // called from subdevice
57   DECLARE_WRITE_LINE_MEMBER( rx_w ) { m_write_rx(state); }
58   DECLARE_WRITE_LINE_MEMBER( pin_w ) { m_write_pin(state); }
59
4860protected:
4961   // device-level overrides
5062   virtual void device_start();
5163   virtual void device_reset();
5264
5365   device_epson_sio_interface *m_cart;
66
67private:
68   devcb2_write_line m_write_rx;
69   devcb2_write_line m_write_pin;
5470};
5571
5672
r26920r26921
6278   device_epson_sio_interface(const machine_config &mconfig, device_t &device);
6379   virtual ~device_epson_sio_interface();
6480
65   virtual int rx_r() { return 1; };
66   virtual int pin_r() { return 1; };
67
6881   virtual void tx_w(int state) { };
6982   virtual void pout_w(int state) { };
7083
trunk/src/mess/includes/hx20.h
r26920r26921
111111
112112   DECLARE_WRITE_LINE_MEMBER( rtc_irq_w );
113113
114   DECLARE_WRITE_LINE_MEMBER( sio_rx_w ) { m_sio_rx = state; }
115   DECLARE_WRITE_LINE_MEMBER( sio_pin_w ) { m_sio_pin = state; }
116
114117   void update_interrupt();
115118
116119   // CPU state
r26920r26921
126129
127130   // video state
128131   UINT8 m_lcd_data;
132
133   // sio state
134   int m_sio_rx;
135   int m_sio_pin;
129136};
130137
131138#endif
trunk/src/mess/drivers/hx20.c
r26920r26921
213213   data |= m_kbrequest << 5;
214214
215215   // serial
216   data |= m_sio->pin_r() << 6;
216   data |= m_sio_pin << 6;
217217
218218   return data;
219219}
r26920r26921
271271   if (m_slave_sio)
272272      data |= m_slave_rx << 3;
273273   else
274      data |= m_sio->rx_r() << 3;
274      data |= m_sio_rx << 3;
275275
276276   return data;
277277}
r26920r26921
851851   MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
852852   MCFG_CASSETTE_ADD(CASSETTE_TAG, default_cassette_interface)
853853   MCFG_EPSON_SIO_ADD("sio", "tf20")
854   MCFG_EPSON_SIO_RX(WRITELINE(hx20_state, sio_rx_w))
855   MCFG_EPSON_SIO_PIN(WRITELINE(hx20_state, sio_pin_w))
854856
855857   // internal ram
856858   MCFG_RAM_ADD(RAM_TAG)
trunk/src/mess/drivers/px4.c
r26920r26921
127127   UINT8 m_artcr;
128128   UINT8 m_swr;
129129
130   int rxd_r();
131130   void txd_w(int data);
132131
133132   // 7508 internal
r26920r26921
156155
157156   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
158157
159   DECLARE_WRITE_LINE_MEMBER( serial_rx_w );
160   DECLARE_WRITE_LINE_MEMBER( serial_dcd_w );
161   DECLARE_WRITE_LINE_MEMBER( serial_dsr_w );
162   DECLARE_WRITE_LINE_MEMBER( serial_cts_w );
158   DECLARE_WRITE_LINE_MEMBER( sio_rx_w );
159   DECLARE_WRITE_LINE_MEMBER( sio_pin_w );
163160
161   DECLARE_WRITE_LINE_MEMBER( rs232_rx_w );
162   DECLARE_WRITE_LINE_MEMBER( rs232_dcd_w );
163   DECLARE_WRITE_LINE_MEMBER( rs232_dsr_w );
164   DECLARE_WRITE_LINE_MEMBER( rs232_cts_w );
165
166   int m_sio_pin;
167
164168   int m_rs232_dcd;
165169   int m_rs232_cts;
166170
r26920r26921
208212   TIMER_CALLBACK_MEMBER(receive_data);
209213   TIMER_DEVICE_CALLBACK_MEMBER(frc_tick);
210214   TIMER_DEVICE_CALLBACK_MEMBER(upd7508_1sec_callback);
215
216private:
217   DECLARE_WRITE_LINE_MEMBER( serial_rx_w );
211218};
212219
213220
r26920r26921
411418// status register
412419READ8_MEMBER( px4_state::px4_str_r )
413420{
414   UINT8 result = 0;
421   UINT8 data = 0;
415422
416   if (VERBOSE)
423   if (0)
417424      logerror("%s: px4_str_r\n", machine().describe_context());
418425
419   result |= (m_ext_cas)->input() > 0 ? 1 : 0;
420   result |= 1 << 1;   // BCRD, barcode reader input
421   result |= 1 << 2;   // RDY signal from 7805
422   result |= 1 << 3;   // RDYSIO, enable access to the 7805
423   result |= m_bankr & 0xf0;   // bit 4-7, BANK - memory bank
426   data |= (m_ext_cas)->input() > 0 ? 1 : 0;
427   data |= 1 << 1;   // BCRD, barcode reader input
428   data |= 1 << 2;   // RDY signal from 7805
429   data |= 1 << 3;   // RDYSIO, enable access to the 7805
430   data |= m_bankr & 0xf0;   // bit 4-7, BANK - memory bank
424431
425   return result;
432   return data;
426433}
427434
428435// helper function to map rom capsules
r26920r26921
670677      input_callback(m_input_state & ~RX);
671678}
672679
673WRITE_LINE_MEMBER( px4_state::serial_dcd_w )
680WRITE_LINE_MEMBER( px4_state::sio_rx_w )
674681{
682   if (!BIT(m_swr, 3) && BIT(m_swr, 2))
683      serial_rx_w(state);
684}
685
686WRITE_LINE_MEMBER( px4_state::sio_pin_w )
687{
688   m_sio_pin = state;
689}
690
691WRITE_LINE_MEMBER( px4_state::rs232_rx_w )
692{
693   if (BIT(m_swr, 3))
694      serial_rx_w(state);
695}
696
697WRITE_LINE_MEMBER( px4_state::rs232_dcd_w )
698{
675699   m_rs232_dcd = state;
676700}
677701
678WRITE_LINE_MEMBER( px4_state::serial_dsr_w )
702WRITE_LINE_MEMBER( px4_state::rs232_dsr_w )
679703{
680704   m_artsr |= !state << 7;
681705}
682706
683WRITE_LINE_MEMBER( px4_state::serial_cts_w )
707WRITE_LINE_MEMBER( px4_state::rs232_cts_w )
684708{
685709   m_rs232_cts = state;
686710}
r26920r26921
760784   m_input_state = state;
761785}
762786
763// helper function to read from selected serial port
764int px4_state::rxd_r()
765{
766   if (BIT(m_swr, 3))
767      // from rs232
768      return get_in_data_bit();
769   else
770      if (BIT(m_swr, 2))
771         // from sio
772         return m_sio->rx_r();
773      else
774         // from cartridge
775         return 0;
776}
777
778787// helper function to write to selected serial port
779788void px4_state::txd_w(int data)
780789{
781790   if (BIT(m_swr, 2))
782      // from sio
791      // to sio
783792      m_sio->tx_w(data);
784793   else
785794      if (BIT(m_swr, 3))
786         // from rs232
795         // to rs232
787796         m_rs232->tx(data);
788797      // else to cartridge
789798}
r26920r26921
808817READ8_MEMBER( px4_state::px4_artdir_r )
809818{
810819   if (VERBOSE)
811      logerror("%s: px4_artdir_r\n", machine().describe_context());
820      logerror("%s: px4_artdir_r (%02x)\n", machine().describe_context(), m_artdir);
812821
813822   // clear ready
814823   m_artsr &= ~ART_RXRDY;
r26920r26921
873882   data |= !m_centronics->pe_r() << 1;
874883
875884   // sio status
876   data |= !m_sio->pin_r() << 2;
885   data |= !m_sio_pin << 2;
877886
878887   // serial data
879   data |= rxd_r() << 3;
888   data |= get_in_data_bit() << 3;
880889
881890   // rs232 status
882891   data |= !m_rs232_dcd << 4;
r26920r26921
886895   data |= 0 << 7;   // bit 7, caud - audio input from cartridge
887896
888897   if (0)
889      logerror("%s: px4_iostr_r (%02x)\n", machine().describe_context(), data);
898      logerror("%s: px4_iostr_r: rx = %d, dcd = %d, cts = %d\n", machine().describe_context(), BIT(data, 3), BIT(data, 4), BIT(data, 5));
890899
891   logerror("%s: px4_iostr_r: rx = %d, dcd = %d, cts = %d\n", machine().describe_context(), BIT(data, 3), BIT(data, 4), BIT(data, 5));
892
893900   return data;
894901}
895902
r26920r26921
933940   m_centronics->strobe_w(!BIT(data, 0));
934941   m_centronics->init_prime_w(BIT(data, 1));
935942
936   m_sio->pout_w(!BIT(data, 2));
943   m_sio->pout_w(BIT(data, 2));
937944
938945   // bit 3, cartridge reset
939946
r26920r26921
11891196   PORT_START("dips")
11901197
11911198   PORT_DIPNAME(0x0f, 0x0f, "Character set")
1192   PORT_DIPLOCATION("DIP:8,7,6,5")
1199   PORT_DIPLOCATION("PX-4:8,7,6,5")
11931200   PORT_DIPSETTING(0x0f, "ASCII")
11941201   PORT_DIPSETTING(0x0e, "France")
11951202   PORT_DIPSETTING(0x0d, "Germany")
r26920r26921
12021209   PORT_DIPSETTING(0x06, "Norway")
12031210
12041211   PORT_DIPNAME(0x30, 0x30, "LST device")
1205   PORT_DIPLOCATION("DIP:4,3")
1212   PORT_DIPLOCATION("PX-4:4,3")
12061213   PORT_DIPSETTING(0x00, "SIO")
12071214   PORT_DIPSETTING(0x10, "Cartridge printer")
12081215   PORT_DIPSETTING(0x20, "RS-232C")
r26920r26921
12101217
12111218   // available for user applications
12121219   PORT_DIPNAME(0x40, 0x40, "Not used")
1213   PORT_DIPLOCATION("DIP:2")
1220   PORT_DIPLOCATION("PX-4:2")
12141221   PORT_DIPSETTING(0x40, "Enable")
12151222   PORT_DIPSETTING(0x00, "Disable")
12161223
12171224   // this is automatically selected by the os, the switch has no effect
12181225   PORT_DIPNAME(0x80, 0x00, "Keyboard type")
1219   PORT_DIPLOCATION("DIP:1")
1226   PORT_DIPLOCATION("PX-4:1")
12201227   PORT_DIPSETTING(0x80, "Item keyboard")
12211228   PORT_DIPSETTING(0x00, "Standard keyboard")
12221229INPUT_PORTS_END
r26920r26921
13981405
13991406   // sio port
14001407   MCFG_EPSON_SIO_ADD("sio", NULL)
1408   MCFG_EPSON_SIO_RX(WRITELINE(px4_state, sio_rx_w))
1409   MCFG_EPSON_SIO_PIN(WRITELINE(px4_state, sio_pin_w))
14011410
14021411   // rs232 port
14031412   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
1404   MCFG_SERIAL_OUT_RX_HANDLER(WRITELINE(px4_state, serial_rx_w))
1405   MCFG_RS232_OUT_DCD_HANDLER(WRITELINE(px4_state, serial_dcd_w))
1406   MCFG_RS232_OUT_DSR_HANDLER(WRITELINE(px4_state, serial_dsr_w))
1407   MCFG_RS232_OUT_CTS_HANDLER(WRITELINE(px4_state, serial_cts_w))
1413   MCFG_SERIAL_OUT_RX_HANDLER(WRITELINE(px4_state, rs232_rx_w))
1414   MCFG_RS232_OUT_DCD_HANDLER(WRITELINE(px4_state, rs232_dcd_w))
1415   MCFG_RS232_OUT_DSR_HANDLER(WRITELINE(px4_state, rs232_dsr_w))
1416   MCFG_RS232_OUT_CTS_HANDLER(WRITELINE(px4_state, rs232_cts_w))
14081417
14091418   // rom capsules
14101419   MCFG_CARTSLOT_ADD("capsule1")

Previous 199869 Revisions Next


© 1997-2024 The MAME Team