Previous 199869 Revisions Next

r18807 Friday 2nd November, 2012 at 05:04:15 UTC by Dirk Best
Added EPSON SIO port emulation as used by the HX-20, PX-8 and PX-4. Updated PF-10 and TF-20 floppy devices to a new style device and use the SIO implementation. Updated PX-4 driver to use the new emulation.
[src/mess]mess.mak
[src/mess/drivers]px4.c
[src/mess/machine]epson_sio.c* epson_sio.h* pf10.c pf10.h tf20.c tf20.h

trunk/src/mess/machine/pf10.c
r18806r18807
1/***************************************************************************
1/**********************************************************************
22
3    Epson PF-10
3    EPSON PF-10
44
5    Serial floppy drive
5    Battery operated portable 3.5" floppy drive
66
7    Skeleton driver, not working
7    Status: Skeleton driver, not doing much.
88
9***************************************************************************/
9    Copyright MESS Team.
10    Visit http://mamedev.org for licensing and usage restrictions.
1011
11#include "emu.h"
12**********************************************************************/
13
1214#include "pf10.h"
13#include "cpu/m6800/m6800.h"
14#include "machine/upd765.h"
1515
1616
17/***************************************************************************
18    TYPE DEFINITIONS
19***************************************************************************/
17//**************************************************************************
18//  DEVICE DEFINITIONS
19//**************************************************************************
2020
21struct pf10_state
22{
23   UINT8 dummy;
24};
21const device_type EPSON_PF10 = &device_creator<epson_pf10_device>;
2522
2623
27/*****************************************************************************
28    INLINE FUNCTIONS
29*****************************************************************************/
24//-------------------------------------------------
25//  address maps
26//-------------------------------------------------
3027
31INLINE pf10_state *get_safe_token(device_t *device)
32{
33   assert(device != NULL);
34   assert(device->type() == PF10);
35
36   return (pf10_state *)downcast<pf10_device *>(device)->token();
37}
38
39
40/*****************************************************************************
41    ADDRESS MAPS
42*****************************************************************************/
43
44static ADDRESS_MAP_START( pf10_mem, AS_PROGRAM, 8, pf10_device )
45   AM_RANGE(0x0040, 0x013f) AM_RAM /* internal ram */
28static ADDRESS_MAP_START( cpu_mem, AS_PROGRAM, 8, epson_pf10_device )
29   AM_RANGE(0x0000, 0x001f) AM_READWRITE_LEGACY(m6801_io_r, m6801_io_w)
30   AM_RANGE(0x0040, 0x00ff) AM_RAM /* 192 bytes internal ram */
4631   AM_RANGE(0x0800, 0x0fff) AM_RAM /* external 2k ram */
47   AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("pf10", 0)
32   AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("maincpu", 0)
4833ADDRESS_MAP_END
4934
50static ADDRESS_MAP_START( pf10_io, AS_IO, 8, pf10_device )
35static ADDRESS_MAP_START( cpu_io, AS_IO, 8, epson_pf10_device )
5136   ADDRESS_MAP_UNMAP_HIGH
5237   ADDRESS_MAP_GLOBAL_MASK(0xff)
5338ADDRESS_MAP_END
5439
5540
56/*****************************************************************************
57    MACHINE CONFIG
58*****************************************************************************/
41//-------------------------------------------------
42//  rom_region - device-specific ROM region
43//-------------------------------------------------
5944
60static MACHINE_CONFIG_FRAGMENT( pf10 )
61   MCFG_CPU_ADD("pf10", M6803, XTAL_2_4576MHz / 4 /* ??? */) /* HD63A03 */
62   MCFG_CPU_PROGRAM_MAP(pf10_mem)
63   MCFG_CPU_IO_MAP(pf10_io)
64
65   MCFG_UPD765A_ADD("upd765a", false, true)
66MACHINE_CONFIG_END
67
68
69/***************************************************************************
70    ROM DEFINITIONS
71***************************************************************************/
72
7345ROM_START( pf10 )
74   ROM_REGION(0x2000, "pf10", 0)
46   ROM_REGION(0x2000, "maincpu", 0)
7547   ROM_LOAD("k3pf1.bin", 0x0000, 0x2000, CRC(eef4593a) SHA1(bb176e4baf938fe58c2d32f7c46d7bb7b0627755))
7648ROM_END
7749
78
79/*****************************************************************************
80    DEVICE INTERFACE
81*****************************************************************************/
82
83static DEVICE_START( pf10 )
50const rom_entry *epson_pf10_device::device_rom_region() const
8451{
85   pf10_state *pf10 = get_safe_token(device);
86
87   pf10->dummy = 0;
52   return ROM_NAME( pf10 );
8853}
8954
90static DEVICE_RESET( pf10 )
91{
92}
9355
94/***************************************************************************
95    IMPLEMENTATION
96***************************************************************************/
56//-------------------------------------------------
57//  machine_config_additions - device-specific
58//  machine configurations
59//-------------------------------------------------
9760
98/* serial interface in (to the host computer) */
99READ_LINE_DEVICE_HANDLER( pf10_txd1_r )
61static const floppy_format_type pf10_floppy_formats[] =
10062{
101   logerror("%s: pf10_txd1_r\n", device->machine().describe_context());
63   FLOPPY_D88_FORMAT,
64   FLOPPY_MFM_FORMAT,
65   FLOPPY_MFI_FORMAT,
66   NULL
67};
10268
103   return 0;
104}
69static SLOT_INTERFACE_START( pf10_floppies )
70   SLOT_INTERFACE( "35dd", FLOPPY_35_DD )
71SLOT_INTERFACE_END
10572
106WRITE_LINE_DEVICE_HANDLER( pf10_rxd1_w )
107{
108   logerror("%s: pf10_rxd1_w %u\n", device->machine().describe_context(), state);
109}
73static MACHINE_CONFIG_FRAGMENT( pf10 )
74   MCFG_CPU_ADD("maincpu", HD6303Y, XTAL_2_4576MHz / 4 /* ??? */) // HD63A03XF
75   MCFG_CPU_PROGRAM_MAP(cpu_mem)
76   MCFG_CPU_IO_MAP(cpu_io)
11077
78   MCFG_UPD765A_ADD("upd765a", false, true)
79   MCFG_FLOPPY_DRIVE_ADD("upd765a:0", pf10_floppies, "35dd", 0, pf10_floppy_formats) // SMD-165
11180
112/* serial interface out (to another floppy drive) */
113READ_LINE_DEVICE_HANDLER( pf10_txd2_r )
114{
115   logerror("%s: pf10_txd2_r\n", device->machine().describe_context());
81   MCFG_EPSON_SIO_ADD("sio")
82MACHINE_CONFIG_END
11683
117   return 0;
118}
119
120WRITE_LINE_DEVICE_HANDLER( pf10_rxd2_w )
84machine_config_constructor epson_pf10_device::device_mconfig_additions() const
12185{
122   logerror("%s: pf10_rxd2_w %u\n", device->machine().describe_context(), state);
86   return MACHINE_CONFIG_NAME( pf10 );
12387}
12488
125const device_type PF10 = &device_creator<pf10_device>;
12689
127pf10_device::pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
128   : device_t(mconfig, PF10, "PF-10", tag, owner, clock)
129{
130   m_token = global_alloc_clear(pf10_state);
131}
90//**************************************************************************
91//  LIVE DEVICE
92//**************************************************************************
13293
13394//-------------------------------------------------
134//  device_config_complete - perform any
135//  operations now that the configuration is
136//  complete
95//  epson_pf10_device - constructor
13796//-------------------------------------------------
13897
139void pf10_device::device_config_complete()
98epson_pf10_device::epson_pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
99   device_t(mconfig, EPSON_PF10, "EPSON PF-10 floppy drive", tag, owner, clock),
100   device_epson_sio_interface(mconfig, *this),
101   m_cpu(*this, "maincpu"),
102   m_fdc(*this, "upd765a"),
103   m_sio(*this, "sio")
140104{
141105}
142106
107
143108//-------------------------------------------------
144109//  device_start - device-specific startup
145110//-------------------------------------------------
146111
147void pf10_device::device_start()
112void epson_pf10_device::device_start()
148113{
149   DEVICE_START_NAME( pf10 )(this);
114   m_floppy = subdevice<floppy_connector>("upd765a:0")->get_device();
150115}
151116
117
152118//-------------------------------------------------
153//  device_reset - device-specific reset
119//  tx_w
154120//-------------------------------------------------
155121
156void pf10_device::device_reset()
122void epson_pf10_device::tx_w(int level)
157123{
158   DEVICE_RESET_NAME( pf10 )(this);
124   logerror("%s: tx_w(%d)\n", tag(), level);
159125}
160126
127
161128//-------------------------------------------------
162//  device_mconfig_additions - return a pointer to
163//  the device's machine fragment
129//  pout_w
164130//-------------------------------------------------
165131
166machine_config_constructor pf10_device::device_mconfig_additions() const
132void epson_pf10_device::pout_w(int level)
167133{
168   return MACHINE_CONFIG_NAME( pf10 );
134   logerror("%s: pout_w(%d)\n", tag(), level);
169135}
170136
137
171138//-------------------------------------------------
172//  device_rom_region - return a pointer to the
173//  the device's ROM definitions
139//  rx_r
174140//-------------------------------------------------
175141
176const rom_entry *pf10_device::device_rom_region() const
142int epson_pf10_device::rx_r()
177143{
178   return ROM_NAME(pf10 );
144   logerror("%s: rx_r\n", tag());
145
146   return 1;
179147}
180148
181149
150//-------------------------------------------------
151//  pin_r
152//-------------------------------------------------
153
154int epson_pf10_device::pin_r()
155{
156   logerror("%s: pin_r\n", tag());
157
158   return 1;
159}
trunk/src/mess/machine/pf10.h
r18806r18807
1/***************************************************************************
1/**********************************************************************
22
3    Epson PF-10
3    EPSON PF-10
44
5    Serial floppy drive
5    Battery operated portable 3.5" floppy drive
66
7***************************************************************************/
7    Copyright MESS Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
89
10**********************************************************************/
11
12#pragma once
13
914#ifndef __PF10_H__
1015#define __PF10_H__
1116
12#include "devcb.h"
17#include "emu.h"
18#include "cpu/m6800/m6800.h"
19#include "machine/upd765.h"
20#include "machine/epson_sio.h"
21#include "imagedev/flopdrv.h"
22#include "formats/mfi_dsk.h"
23#include "formats/hxcmfm_dsk.h"
24#include "formats/d88_dsk.h"
1325
1426
15/***************************************************************************
16    TYPE DEFINITIONS
17***************************************************************************/
27//**************************************************************************
28//  TYPE DEFINITIONS
29//**************************************************************************
1830
19#if 0
20struct pf10_interface
31class epson_pf10_device : public device_t,
32                          public device_epson_sio_interface
2133{
22};
23#endif
24
25
26/***************************************************************************
27    FUNCTION PROTOTYPES
28***************************************************************************/
29/* serial interface in (to the host computer) */
30READ_LINE_DEVICE_HANDLER( pf10_txd1_r );
31WRITE_LINE_DEVICE_HANDLER( pf10_rxd1_w );
32
33/* serial interface out (to another floppy drive) */
34READ_LINE_DEVICE_HANDLER( pf10_txd2_r );
35WRITE_LINE_DEVICE_HANDLER( pf10_rxd2_w );
36
37
38/***************************************************************************
39    DEVICE CONFIGURATION MACROS
40***************************************************************************/
41
42class pf10_device : public device_t
43{
4434public:
45   pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
46   ~pf10_device() { global_free(m_token); }
35   // construction/destruction
36   epson_pf10_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4737
48   // access to legacy token
49   void *token() const { assert(m_token != NULL); return m_token; }
38   // optional information overrides
39   virtual const rom_entry *device_rom_region() const;
40   virtual machine_config_constructor device_mconfig_additions() const;
41
5042protected:
5143   // device-level overrides
52   virtual void device_config_complete();
44   virtual void device_config_complete() { m_shortname = "epson_pf10"; }
5345   virtual void device_start();
54   virtual void device_reset();
55   virtual const rom_entry *device_rom_region() const;
56   virtual machine_config_constructor device_mconfig_additions() const;
46
47   // device_epson_sio_interface overrides
48   virtual int rx_r();
49   virtual int pin_r();
50   virtual void tx_w(int level);
51   virtual void pout_w(int level);
52
5753private:
58   // internal state
59   void *m_token;
54   required_device<cpu_device> m_cpu;
55   required_device<upd765a_device> m_fdc;
56   required_device<epson_sio_device> m_sio;
57
58   floppy_image_device *m_floppy;
6059};
6160
62extern const device_type PF10;
6361
62// device type definition
63extern const device_type EPSON_PF10;
6464
65#define MCFG_PF10_ADD(_tag) \
66   MCFG_DEVICE_ADD(_tag, PF10, 0) \
6765
68
69#endif /* __PF10_H__ */
66#endif // __PF10_H__
trunk/src/mess/machine/epson_sio.c
r0r18807
1/**********************************************************************
2
3    EPSON SIO port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "epson_sio.h"
11
12// supported devices
13#include "machine/pf10.h"
14#include "machine/tf20.h"
15
16
17//**************************************************************************
18//  GLOBAL VARIABLES
19//**************************************************************************
20
21const device_type EPSON_SIO = &device_creator<epson_sio_device>;
22
23
24//**************************************************************************
25//  CARD INTERFACE
26//**************************************************************************
27
28//-------------------------------------------------
29//  device_epson_sio_interface - constructor
30//-------------------------------------------------
31
32device_epson_sio_interface::device_epson_sio_interface(const machine_config &mconfig, device_t &device)
33   : device_slot_card_interface(mconfig,device)
34{
35   m_slot = dynamic_cast<epson_sio_device *>(device.owner());
36}
37
38
39//-------------------------------------------------
40//  ~device_epson_sio_interface - destructor
41//-------------------------------------------------
42
43device_epson_sio_interface::~device_epson_sio_interface()
44{
45}
46
47
48//**************************************************************************
49//  LIVE DEVICE
50//**************************************************************************
51
52//-------------------------------------------------
53//  epson_sio_device - constructor
54//-------------------------------------------------
55
56epson_sio_device::epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
57        device_t(mconfig, EPSON_SIO, "EPSON SIO port", tag, owner, clock),
58      device_slot_interface(mconfig, *this)
59{
60}
61
62
63//-------------------------------------------------
64//  epson_sio_device - destructor
65//-------------------------------------------------
66
67epson_sio_device::~epson_sio_device()
68{
69}
70
71
72//-------------------------------------------------
73//  device_start - device-specific startup
74//-------------------------------------------------
75
76void epson_sio_device::device_start()
77{
78   m_cart = dynamic_cast<device_epson_sio_interface *>(get_card_device());
79}
80
81
82//-------------------------------------------------
83//  device_reset - device-specific reset
84//-------------------------------------------------
85
86void epson_sio_device::device_reset()
87{
88}
89
90
91WRITE_LINE_MEMBER( epson_sio_device::tx_w )
92{
93   if (m_cart != NULL)
94      m_cart->tx_w(state);
95}
96
97WRITE_LINE_MEMBER( epson_sio_device::pout_w )
98{
99   if (m_cart != NULL)
100      m_cart->pout_w(state);
101}
102
103READ_LINE_MEMBER( epson_sio_device::rx_r )
104{
105   int state = 1;
106
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
124//**************************************************************************
125//  SLOT INTERFACE
126//**************************************************************************
127
128SLOT_INTERFACE_START( epson_sio_devices )
129   SLOT_INTERFACE("pf10", EPSON_PF10)
130   SLOT_INTERFACE("tf20", EPSON_TF20)
131SLOT_INTERFACE_END
trunk/src/mess/machine/epson_sio.h
r0r18807
1/**********************************************************************
2
3    EPSON SIO port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#pragma once
11
12#ifndef __EPSON_SIO_H__
13#define __EPSON_SIO_H__
14
15#include "emu.h"
16
17
18//**************************************************************************
19//  INTERFACE CONFIGURATION MACROS
20//**************************************************************************
21
22#define MCFG_EPSON_SIO_ADD(_tag) \
23    MCFG_DEVICE_ADD(_tag, EPSON_SIO, 0) \
24   MCFG_DEVICE_SLOT_INTERFACE(epson_sio_devices, NULL, NULL, false)
25
26
27//**************************************************************************
28//  TYPE DEFINITIONS
29//**************************************************************************
30
31class device_epson_sio_interface;
32
33
34class epson_sio_device : public device_t,
35                         public device_slot_interface
36{
37public:
38   // construction/destruction
39   epson_sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
40   virtual ~epson_sio_device();
41
42   DECLARE_READ_LINE_MEMBER(rx_r);
43   DECLARE_READ_LINE_MEMBER(pin_r);
44
45   DECLARE_WRITE_LINE_MEMBER(tx_w);
46   DECLARE_WRITE_LINE_MEMBER(pout_w);
47
48protected:
49   // device-level overrides
50   virtual void device_start();
51   virtual void device_reset();
52
53    device_epson_sio_interface *m_cart;
54};
55
56
57// class representing interface-specific live sio device
58class device_epson_sio_interface : public device_slot_card_interface
59{
60public:
61   // construction/destruction
62   device_epson_sio_interface(const machine_config &mconfig, device_t &device);
63   virtual ~device_epson_sio_interface();
64
65   virtual int rx_r() { return 1; };
66   virtual int pin_r() { return 1; };
67
68   virtual void tx_w(int state) { };
69   virtual void pout_w(int state) { };
70
71protected:
72   epson_sio_device *m_slot;
73};
74
75
76// device type definition
77extern const device_type EPSON_SIO;
78
79
80// supported devices
81SLOT_INTERFACE_EXTERN( epson_sio_devices );
82
83
84#endif // __EPSON_SIO_H__
trunk/src/mess/machine/tf20.c
r18806r18807
1/***************************************************************************
1/**********************************************************************
22
3    Epson TF-20
3    EPSON TF-20
44
5    Dual floppy drive with HX-20 factory option
5    Dual 5.25" floppy drive with HX-20 factory option
66
7    Status: Issues with new uPD765, missing uPD7201 emulation.
78
8    Status: Boots from system disk, missing ??PD7201 emulation
9    Copyright MESS Team.
10    Visit http://mamedev.org for licensing and usage restrictions.
911
10***************************************************************************/
12**********************************************************************/
1113
12#include "emu.h"
1314#include "tf20.h"
14#include "cpu/z80/z80.h"
15#include "machine/ram.h"
16#include "machine/upd7201.h"
17#include "machine/upd765.h"
18#include "imagedev/flopdrv.h"
19#include "formats/mfi_dsk.h"
2015
21/***************************************************************************
22    CONSTANTS
23***************************************************************************/
24
2516#define XTAL_CR1   XTAL_8MHz
2617#define XTAL_CR2   XTAL_4_9152MHz
2718
2819
29/***************************************************************************
30    TYPE DEFINITIONS
31***************************************************************************/
20//**************************************************************************
21//  DEVICE DEFINITIONS
22//**************************************************************************
3223
33struct tf20_state
34{
35   device_t *cpu;
36   ram_device *ram;
37   upd765a_device *upd765a;
38   upd7201_device *upd7201;
39   floppy_image_device *floppy_0;
40   floppy_image_device *floppy_1;
24const device_type EPSON_TF20 = &device_creator<epson_tf20_device>;
4125
42   void fdc_int(bool state) {
43      cpu->execute().set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
44   }
45};
4626
27//-------------------------------------------------
28//  address maps
29//-------------------------------------------------
4730
48/*****************************************************************************
49    INLINE FUNCTIONS
50*****************************************************************************/
51
52INLINE tf20_state *get_safe_token(device_t *device)
53{
54   assert(device != NULL);
55   assert(device->type() == TF20);
56
57   return (tf20_state *)downcast<tf20_device *>(device)->token();
58}
59
60
61/***************************************************************************
62    IMPLEMENTATION
63***************************************************************************/
64
65/* serial clock, 38400 baud by default */
66static TIMER_DEVICE_CALLBACK( serial_clock )
67{
68   tf20_state *tf20 = get_safe_token(timer.owner());
69
70   tf20->upd7201->rxca_w(ASSERT_LINE);
71   tf20->upd7201->txca_w(ASSERT_LINE);
72   tf20->upd7201->rxcb_w(ASSERT_LINE);
73   tf20->upd7201->txcb_w(ASSERT_LINE);
74}
75
76/* a read from this location disables the rom */
77static READ8_HANDLER( tf20_rom_disable )
78{
79   tf20_state *tf20 = get_safe_token(space.device().owner());
80   address_space &prg = space.device().memory().space(AS_PROGRAM);
81
82   /* switch in ram */
83   prg.install_ram(0x0000, 0x7fff, tf20->ram->pointer());
84
85   return 0xff;
86}
87
88static READ8_HANDLER( tf20_dip_r )
89{
90   logerror("%s: tf20_dip_r\n", space.machine().describe_context());
91
92   return space.machine().root_device().ioport("tf20_dip")->read();
93}
94
95static TIMER_CALLBACK( tf20_upd765_tc_reset )
96{
97   static_cast<upd765a_device *>(ptr)->tc_w(false);
98}
99
100static READ8_DEVICE_HANDLER( tf20_upd765_tc_r )
101{
102   tf20_state *tf20 = get_safe_token(device->owner());
103   logerror("%s: tf20_upd765_tc_r\n", device->machine().describe_context());
104
105   /* toggle tc on read */
106   tf20->upd765a->tc_w(true);
107   space.machine().scheduler().timer_set(attotime::zero, FUNC(tf20_upd765_tc_reset), 0, device);
108
109   return 0xff;
110}
111
112static WRITE8_HANDLER( tf20_fdc_control_w )
113{
114   tf20_state *tf20 = get_safe_token(space.device().owner());
115   logerror("%s: tf20_fdc_control_w %02x\n", space.machine().describe_context(), data);
116
117   /* bit 0, motor on signal */
118   tf20->floppy_0->mon_w(!BIT(data, 0));
119   tf20->floppy_1->mon_w(!BIT(data, 0));
120}
121
122static IRQ_CALLBACK( tf20_irq_ack )
123{
124   return 0x00;
125}
126
127
128/***************************************************************************
129    EXTERNAL INTERFACE
130***************************************************************************/
131
132/* serial output signal (to the host computer) */
133READ_LINE_DEVICE_HANDLER( tf20_rxs_r )
134{
135   tf20_state *tf20 = get_safe_token(device);
136   logerror("%s: tf20_rxs_r\n", device->machine().describe_context());
137
138   return tf20->upd7201->txda_r();
139}
140
141READ_LINE_DEVICE_HANDLER( tf20_pins_r )
142{
143   tf20_state *tf20 = get_safe_token(device);
144   logerror("%s: tf20_pins_r\n", device->machine().describe_context());
145
146   return tf20->upd7201->dtra_r();
147}
148
149/* serial input signal (from host computer) */
150WRITE_LINE_DEVICE_HANDLER( tf20_txs_w )
151{
152   tf20_state *tf20 = get_safe_token(device);
153   logerror("%s: tf20_txs_w %u\n", device->machine().describe_context(), state);
154
155   tf20->upd7201->rxda_w(state);
156}
157
158WRITE_LINE_DEVICE_HANDLER( tf20_pouts_w )
159{
160   tf20_state *tf20 = get_safe_token(device);
161   logerror("%s: tf20_pouts_w %u\n", device->machine().describe_context(), state);
162
163   tf20->upd7201->ctsa_w(state);
164}
165
166#ifdef UNUSED_FUNCTION
167/* serial output signal (to another terminal) */
168WRITE_LINE_DEVICE_HANDLER( tf20_txc_w )
169{
170   tf20_state *tf20 = get_safe_token(device);
171   logerror("%s: tf20_txc_w %u\n", device->machine().describe_context(), state);
172
173   tf20->upd7201->rxda_w(state);
174}
175
176/* serial input signal (from another terminal) */
177READ_LINE_DEVICE_HANDLER( tf20_rxc_r )
178{
179   tf20_state *tf20 = get_safe_token(device);
180   logerror("%s: tf20_rxc_r\n", device->machine().describe_context());
181
182   return tf20->upd7201->txda_r();
183}
184
185WRITE_LINE_DEVICE_HANDLER( tf20_poutc_w )
186{
187   tf20_state *tf20 = get_safe_token(device);
188   logerror("%s: tf20_poutc_w %u\n", device->machine().describe_context(), state);
189
190   tf20->upd7201->ctsa_w(state);
191}
192
193READ_LINE_DEVICE_HANDLER( tf20_pinc_r )
194{
195   tf20_state *tf20 = get_safe_token(device);
196   logerror("%s: tf20_pinc_r\n", device->machine().describe_context());
197
198   return tf20->upd7201->dtra_r();
199}
200#endif
201
202
203/*****************************************************************************
204    ADDRESS MAPS
205*****************************************************************************/
206
207static ADDRESS_MAP_START( tf20_mem, AS_PROGRAM, 8, tf20_device )
208   AM_RANGE(0x0000, 0x7fff) AM_RAMBANK("bank21")
209   AM_RANGE(0x8000, 0xffff) AM_RAMBANK("bank22")
31static ADDRESS_MAP_START( cpu_mem, AS_PROGRAM, 8, epson_tf20_device )
32   AM_RANGE(0x0000, 0x7fff) AM_RAMBANK("bank1")
33   AM_RANGE(0x8000, 0xffff) AM_RAMBANK("bank2")
21034ADDRESS_MAP_END
21135
212static ADDRESS_MAP_START( tf20_io, AS_IO, 8, tf20_device )
36static ADDRESS_MAP_START( cpu_io, AS_IO, 8, epson_tf20_device )
21337   ADDRESS_MAP_UNMAP_HIGH
21438   ADDRESS_MAP_GLOBAL_MASK(0xff)
21539   AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("3a", upd7201_device, ba_cd_r, ba_cd_w)
216   AM_RANGE(0xf6, 0xf6) AM_READ_LEGACY(tf20_rom_disable)
217   AM_RANGE(0xf7, 0xf7) AM_READ_LEGACY(tf20_dip_r)
218   AM_RANGE(0xf8, 0xf8) AM_DEVREAD_LEGACY("5a", tf20_upd765_tc_r) AM_WRITE_LEGACY(tf20_fdc_control_w)
40   AM_RANGE(0xf6, 0xf6) AM_READ(rom_disable_r)
41   AM_RANGE(0xf7, 0xf7) AM_READ_PORT("tf20_dip")
42   AM_RANGE(0xf8, 0xf8) AM_READWRITE(upd765_tc_r, fdc_control_w)
21943   AM_RANGE(0xfa, 0xfb) AM_DEVICE("5a", upd765a_device, map)
22044ADDRESS_MAP_END
22145
22246
223/***************************************************************************
224    INPUT PORTS
225***************************************************************************/
47//-------------------------------------------------
48//  rom_region - device-specific ROM region
49//-------------------------------------------------
22650
51ROM_START( tf20 )
52   ROM_REGION(0x0800, "rom", 0)
53   ROM_LOAD("tfx.15e", 0x0000, 0x0800, CRC(af34f084) SHA1(c9bdf393f757ba5d8f838108ceb2b079be1d616e))
54ROM_END
55
56const rom_entry *epson_tf20_device::device_rom_region() const
57{
58   return ROM_NAME( tf20 );
59}
60
61
62//-------------------------------------------------
63//  input_ports - device-specific input ports
64//-------------------------------------------------
65
22766INPUT_PORTS_START( tf20 )
22867   PORT_START("tf20_dip")
22968   PORT_DIPNAME(0x0f, 0x0f, "Drive extension")
r18806r18807
23271   PORT_DIPSETTING(0x07, "C & D Drive")
23372INPUT_PORTS_END
23473
74ioport_constructor epson_tf20_device::device_input_ports() const
75{
76   return INPUT_PORTS_NAME( tf20 );
77}
23578
236/*****************************************************************************
237    MACHINE CONFIG
238*****************************************************************************/
23979
80//-------------------------------------------------
81//  machine_config_additions - device-specific
82//  machine configurations
83//-------------------------------------------------
84
24085static UPD7201_INTERFACE( tf20_upd7201_intf )
24186{
24287   DEVCB_NULL,            /* interrupt: nc */
r18806r18807
271116   }
272117};
273118
274static const floppy_format_type tf20_floppy_formats[] = {
119static const floppy_format_type tf20_floppy_formats[] =
120{
121   FLOPPY_D88_FORMAT,
122   FLOPPY_MFM_FORMAT,
275123   FLOPPY_MFI_FORMAT,
276124   NULL
277125};
r18806r18807
281129SLOT_INTERFACE_END
282130
283131static MACHINE_CONFIG_FRAGMENT( tf20 )
284   MCFG_CPU_ADD("tf20", Z80, XTAL_CR1 / 2) /* uPD780C */
285   MCFG_CPU_PROGRAM_MAP(tf20_mem)
286   MCFG_CPU_IO_MAP(tf20_io)
132   MCFG_CPU_ADD("19b", Z80, XTAL_CR1 / 2) /* uPD780C */
133   MCFG_CPU_PROGRAM_MAP(cpu_mem)
134   MCFG_CPU_IO_MAP(cpu_io)
287135
288   /* 64k internal ram */
136   // 64k internal ram
289137   MCFG_RAM_ADD("ram")
290138   MCFG_RAM_DEFAULT_SIZE("64k")
291139
292   /* upd765a floppy controller */
293   MCFG_UPD765A_ADD("5a", false, true)
294
295   /* upd7201 serial interface */
140   // upd7201 serial interface
296141   MCFG_UPD7201_ADD("3a", XTAL_CR1 / 2, tf20_upd7201_intf)
297   MCFG_TIMER_ADD_PERIODIC("serial_timer", serial_clock, attotime::from_hz(XTAL_CR2 / 128))
298142
299   /* 2 floppy drives */
143   // floppy disk controller
144   MCFG_UPD765A_ADD("5a", true, true)
145
146   // floppy drives
300147   MCFG_FLOPPY_DRIVE_ADD("5a:0", tf20_floppies, "525dd", 0, tf20_floppy_formats)
301148   MCFG_FLOPPY_DRIVE_ADD("5a:1", tf20_floppies, "525dd", 0, tf20_floppy_formats)
149
150   // serial interface to another device
151   MCFG_EPSON_SIO_ADD("sio")
302152MACHINE_CONFIG_END
303153
154machine_config_constructor epson_tf20_device::device_mconfig_additions() const
155{
156   return MACHINE_CONFIG_NAME( tf20 );
157}
304158
305/***************************************************************************
306    ROM DEFINITIONS
307***************************************************************************/
308159
309ROM_START( tf20 )
310   ROM_REGION(0x0800, "tf20", 0)
311   ROM_LOAD("tfx.15e", 0x0000, 0x0800, CRC(af34f084) SHA1(c9bdf393f757ba5d8f838108ceb2b079be1d616e))
312ROM_END
160//**************************************************************************
161//  LIVE DEVICE
162//**************************************************************************
313163
164//-------------------------------------------------
165//  epson_tf20_device - constructor
166//-------------------------------------------------
314167
315/*****************************************************************************
316    DEVICE INTERFACE
317*****************************************************************************/
318
319static DEVICE_START( tf20 )
168epson_tf20_device::epson_tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
169   device_t(mconfig, EPSON_TF20, "EPSON TF-20 dual floppy drive", tag, owner, clock),
170   device_epson_sio_interface(mconfig, *this),
171   m_cpu(*this, "19b"),
172   m_ram(*this, "ram"),
173   m_fdc(*this, "5a"),
174   m_mpsc(*this, "3a"),
175   m_sio(*this, "sio")
320176{
321   tf20_state *tf20 = get_safe_token(device);
322   tf20->cpu = device->subdevice("tf20");
323   address_space &prg = tf20->cpu->memory().space(AS_PROGRAM);
177}
324178
325   tf20->cpu->execute().set_irq_acknowledge_callback(tf20_irq_ack);
326179
327   /* ram device */
328   tf20->ram = device->subdevice<ram_device>("ram");
180//-------------------------------------------------
181//  device_start - device-specific startup
182//-------------------------------------------------
329183
330   /* make sure its already running */
331   if (!tf20->ram->started())
184void epson_tf20_device::device_start()
185{
186   // make sure the ram device is already running
187   if (!m_ram->started())
332188      throw device_missing_dependencies();
333189
334   /* locate child devices */
335   tf20->upd765a = device->subdevice<upd765a_device>("5a");
336   tf20->upd7201 = downcast<upd7201_device *>(device->subdevice("3a"));
337   tf20->floppy_0 = device->subdevice<floppy_connector>("5a:0")->get_device();
338   tf20->floppy_1 = device->subdevice<floppy_connector>("5a:1")->get_device();
190   m_timer_serial = timer_alloc(0, NULL);
191    m_timer_tc = timer_alloc(1, NULL);
339192
340   /* hookup the irq */
341   tf20->upd765a->setup_intrq_cb(upd765a_device::line_cb(FUNC(tf20_state::fdc_int), tf20));
193    m_cpu->set_irq_acknowledge_callback(irq_callback);
342194
343   /* enable second half of ram */
344   prg.install_ram(0x8000, 0xffff, tf20->ram->pointer() + 0x8000);
195   m_fd0 = subdevice<floppy_connector>("5a:0")->get_device();
196   m_fd1 = subdevice<floppy_connector>("5a:1")->get_device();
197
198   m_fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(epson_tf20_device::fdc_irq), this));
199
200   // enable second half of ram
201   m_cpu->space(AS_PROGRAM).install_ram(0x8000, 0xffff, m_ram->pointer() + 0x8000);
202
345203}
346204
347static DEVICE_RESET( tf20 )
205
206//-------------------------------------------------
207//  device_reset - device-specific reset
208//-------------------------------------------------
209
210void epson_tf20_device::device_reset()
348211{
349   device_t *cpu = device->subdevice("tf20");
350   address_space &prg = cpu->memory().space(AS_PROGRAM);
212   // init timers
213   m_timer_serial->adjust(attotime::from_hz(XTAL_CR2 / 128), 0, attotime::from_hz(XTAL_CR2 / 128));
214   m_timer_tc->adjust(attotime::never);
351215
352   /* enable rom */
353   prg.install_rom(0x0000, 0x07ff, 0, 0x7800, cpu->region()->base());
216   // enable rom
217   m_cpu->space(AS_PROGRAM).install_rom(0x0000, 0x07ff, 0, 0x7800, memregion("rom")->base());
354218}
355219
356const device_type TF20 = &device_creator<tf20_device>;
357220
358tf20_device::tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
359   : device_t(mconfig, TF20, "TF-20", tag, owner, clock)
221//-------------------------------------------------
222//  device_timer - handler timer events
223//-------------------------------------------------
224
225void epson_tf20_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
360226{
361   m_token = global_alloc_clear(tf20_state);
227   switch (id)
228   {
229   case 0:
230      m_mpsc->rxca_w(1);
231      m_mpsc->txca_w(1);
232      m_mpsc->rxcb_w(1);
233      m_mpsc->txcb_w(1);
234      break;
235
236   case 1:
237      logerror("%s: tc off\n", tag());
238      m_fdc->tc_w(false);
239      break;
240   }
362241}
363242
243
364244//-------------------------------------------------
365//  device_config_complete - perform any
366//  operations now that the configuration is
367//  complete
245//  irq vector callback
368246//-------------------------------------------------
369247
370void tf20_device::device_config_complete()
248IRQ_CALLBACK( epson_tf20_device::irq_callback )
371249{
372   m_shortname = "tf20";
250   return 0x00;
373251}
374252
253
375254//-------------------------------------------------
376//  device_start - device-specific startup
255//  fdc interrupt
377256//-------------------------------------------------
378257
379void tf20_device::device_start()
258void epson_tf20_device::fdc_irq(bool state)
380259{
381   DEVICE_START_NAME( tf20 )(this);
260   m_cpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE);
382261}
383262
263
384264//-------------------------------------------------
385//  device_reset - device-specific reset
265//  tx_w
386266//-------------------------------------------------
387267
388void tf20_device::device_reset()
268void epson_tf20_device::tx_w(int level)
389269{
390   DEVICE_RESET_NAME( tf20 )(this);
270   logerror("%s: tx_w(%d)\n", tag(), level);
271   m_mpsc->rxda_w(level);
391272}
392273
274
393275//-------------------------------------------------
394//  device_mconfig_additions - return a pointer to
395//  the device's machine fragment
276//  pout_w
396277//-------------------------------------------------
397278
398machine_config_constructor tf20_device::device_mconfig_additions() const
279void epson_tf20_device::pout_w(int level)
399280{
400   return MACHINE_CONFIG_NAME( tf20  );
281   logerror("%s: pout_w(%d)\n", tag(), level);
282   m_mpsc->ctsa_w(level);
401283}
402284
285
403286//-------------------------------------------------
404//  device_rom_region - return a pointer to the
405//  the device's ROM definitions
287//  rx_r
406288//-------------------------------------------------
407289
408const rom_entry *tf20_device::device_rom_region() const
290int epson_tf20_device::rx_r()
409291{
410   return ROM_NAME(tf20 );
292   logerror("%s: rx_r\n", tag());
293   return m_mpsc->txda_r();
411294}
412295
413296
297//-------------------------------------------------
298//  pin_r
299//-------------------------------------------------
300
301int epson_tf20_device::pin_r()
302{
303   logerror("%s: pin_r\n", tag());
304   return m_mpsc->dtra_r();
305}
306
307
308// a read from this location disables the rom
309READ8_MEMBER( epson_tf20_device::rom_disable_r )
310{
311   // switch in ram
312   m_cpu->space(AS_PROGRAM).install_ram(0x0000, 0x7fff, m_ram->pointer());
313   return 0xff;
314}
315
316
317READ8_MEMBER( epson_tf20_device::upd765_tc_r )
318{
319   logerror("%s: upd765_tc_r\n", space.machine().describe_context());
320
321   // toggle tc on read
322   m_fdc->tc_w(true);
323   m_timer_tc->adjust(attotime::zero);
324
325   return 0xff;
326}
327
328
329WRITE8_MEMBER( epson_tf20_device::fdc_control_w )
330{
331   logerror("%s: tf20_fdc_control_w(%02x)\n", space.machine().describe_context(), data);
332
333   // bit 0, motor on signal
334   m_fd0->mon_w(!BIT(data, 0));
335   m_fd1->mon_w(!BIT(data, 0));
336}
trunk/src/mess/machine/tf20.h
r18806r18807
1/***************************************************************************
1/**********************************************************************
22
3    Epson TF-20
3    EPSON TF-20
44
5    Dual floppy drive with HX-20 factory option
5    Dual 5.25" floppy drive with HX-20 factory option
66
7***************************************************************************/
7    Copyright MESS Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
89
10**********************************************************************/
11
12#pragma once
13
914#ifndef __TF20_H__
1015#define __TF20_H__
1116
12#include "devcb.h"
17#include "emu.h"
18#include "cpu/z80/z80.h"
19#include "machine/ram.h"
20#include "machine/upd765.h"
21#include "machine/upd7201.h"
22#include "machine/epson_sio.h"
23#include "imagedev/flopdrv.h"
24#include "formats/mfi_dsk.h"
25#include "formats/hxcmfm_dsk.h"
26#include "formats/d88_dsk.h"
1327
1428
15/***************************************************************************
16    TYPE DEFINITIONS
17***************************************************************************/
29//**************************************************************************
30//  TYPE DEFINITIONS
31//**************************************************************************
1832
19#if 0
20struct tf20_interface
33class epson_tf20_device : public device_t,
34                          public device_epson_sio_interface
2135{
22};
23#endif
36public:
37   // construction/destruction
38   epson_tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
2439
40   // optional information overrides
41   virtual const rom_entry *device_rom_region() const;
42   virtual machine_config_constructor device_mconfig_additions() const;
43   virtual ioport_constructor device_input_ports() const;
2544
26/***************************************************************************
27    FUNCTION PROTOTYPES
28***************************************************************************/
45   // not really public
46   DECLARE_READ8_MEMBER( rom_disable_r );
47   DECLARE_READ8_MEMBER( upd765_tc_r );
48   DECLARE_WRITE8_MEMBER( fdc_control_w );
49   static IRQ_CALLBACK( irq_callback );
2950
30/* serial interface in (to the host computer) */
31WRITE_LINE_DEVICE_HANDLER( tf20_txs_w );
32READ_LINE_DEVICE_HANDLER( tf20_rxs_r );
33WRITE_LINE_DEVICE_HANDLER( tf20_pouts_w );
34READ_LINE_DEVICE_HANDLER( tf20_pins_r );
51   void fdc_irq(bool state);
3552
36#ifdef UNUSED_FUNCTION
37/* serial interface out (to another terminal) */
38WRITE_LINE_DEVICE_HANDLER( tf20_txc_r );
39READ_LINE_DEVICE_HANDLER( tf20_rxc_w );
40WRITE_LINE_DEVICE_HANDLER( tf20_poutc_r );
41READ_LINE_DEVICE_HANDLER( tf20_pinc_w );
42#endif
53protected:
54   // device-level overrides
55   virtual void device_config_complete() { m_shortname = "epson_tf20"; }
56   virtual void device_start();
57   virtual void device_reset();
58   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
4359
44INPUT_PORTS_EXTERN( tf20 );
60   // device_epson_sio_interface overrides
61   virtual int rx_r();
62   virtual int pin_r();
63   virtual void tx_w(int level);
64   virtual void pout_w(int level);
4565
66private:
67   required_device<cpu_device> m_cpu;
68   required_device<ram_device> m_ram;
69   required_device<upd765a_device> m_fdc;
70   required_device<upd7201_device> m_mpsc;
71   required_device<epson_sio_device> m_sio;
4672
47/***************************************************************************
48    DEVICE CONFIGURATION MACROS
49***************************************************************************/
73   floppy_image_device *m_fd0;
74   floppy_image_device *m_fd1;
5075
51class tf20_device : public device_t
52{
53public:
54   tf20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
55   ~tf20_device() { global_free(m_token); }
76   emu_timer *m_timer_serial;
77   emu_timer *m_timer_tc;
5678
57   // access to legacy token
58   void *token() const { assert(m_token != NULL); return m_token; }
59protected:
60   // device-level overrides
61   virtual void device_config_complete();
62   virtual void device_start();
63   virtual void device_reset();
64   virtual const rom_entry *device_rom_region() const;
65   virtual machine_config_constructor device_mconfig_additions() const;
66private:
67   // internal state
68   void *m_token;
79   static const int XTAL_CR1 = XTAL_8MHz;
80   static const int XTAL_CR2 = XTAL_4_9152MHz;
6981};
7082
71extern const device_type TF20;
7283
84// device type definition
85extern const device_type EPSON_TF20;
7386
74#define MCFG_TF20_ADD(_tag) \
75   MCFG_DEVICE_ADD(_tag, TF20, 0) \
7687
77
78#endif /* __TF20_H__ */
88#endif // __TF20_H__
trunk/src/mess/drivers/px4.c
r18806r18807
1010#include "emu.h"
1111#include "cpu/z80/z80.h"
1212#include "machine/ram.h"
13#include "machine/epson_sio.h"
1314#include "machine/ctronics.h"
1415#include "imagedev/cartslot.h"
1516#include "imagedev/cassette.h"
16#include "machine/tf20.h"
1717#include "machine/ram.h"
1818#include "machine/nvram.h"
1919#include "sound/speaker.h"
r18806r18807
2424//  CONSTANTS
2525//**************************************************************************
2626
27#define VERBOSE 1
27#define VERBOSE 0
2828
2929// interrupt sources
3030#define INT0_7508   0x01
r18806r18807
7979         m_ram(*this, RAM_TAG),
8080         m_centronics(*this, "centronics"),
8181         m_ext_cas(*this, "extcas"),
82         m_speaker(*this, SPEAKER_TAG)
82         m_speaker(*this, SPEAKER_TAG),
83         m_sio(*this, "sio")
8384         { }
8485
8586   // internal devices
r18806r18807
8889   required_device<centronics_device> m_centronics;
8990   required_device<cassette_image_device> m_ext_cas;
9091   required_device<device_t> m_speaker;
92   required_device<epson_sio_device> m_sio;
9193
9294   /* gapnit register */
9395   UINT8 m_ctrl1;
r18806r18807
200202
201203
202204//**************************************************************************
203//  SERIAL PORT
204//**************************************************************************
205
206// The floppy is connected to this port
207
208void px4_state::px4_sio_txd(device_t *device,int state)
209{
210   if (VERBOSE)
211      logerror("px4_sio_txd: %d\n", state);
212
213   if (device != NULL)
214      tf20_txs_w(device, state);
215}
216
217int px4_state::px4_sio_rxd(device_t *device)
218{
219   if (VERBOSE)
220      logerror("px4_sio_rxd\n");
221
222   if (device != NULL)
223      return tf20_rxs_r(device);
224   else
225      return ASSERT_LINE;
226}
227
228int px4_state::px4_sio_pin(device_t *device)
229{
230   if (VERBOSE)
231      logerror("px4_sio_pin\n");
232
233   if (device != NULL)
234      return tf20_pins_r(device);
235   else
236      return ASSERT_LINE;
237}
238
239void px4_state::px4_sio_pout(device_t *device,int state)
240{
241   if (VERBOSE)
242      logerror("px4_sio_pout: %d\n", state);
243
244   if (device != NULL)
245      tf20_pouts_w(device, state);
246}
247
248
249//**************************************************************************
250205//  RS232C PORT
251206//**************************************************************************
252207
r18806r18807
843798
844799   result |= m_centronics->busy_r() << 0;
845800   result |= !m_centronics->pe_r() << 1;
846   result |= px4_sio_pin(m_sio_device) << 2;
847   result |= px4_sio_rxd(m_sio_device) << 3;
801   result |= m_sio->pin_r() << 2;
802   result |= m_sio->rx_r() << 3;
848803   result |= px4_rs232c_dcd(m_rs232c_device) << 4;
849804   result |= px4_rs232c_cts(m_rs232c_device) << 5;
850805   result |= 1 << 6;   // bit 6, csel, cartridge option select signal, set to 'other mode'
r18806r18807
865820   if (!ART_TX_ENABLED)
866821   {
867822      // force high when disabled
868      px4_sio_txd(m_sio_device, ASSERT_LINE);
823      m_sio->tx_w(1);
869824      px4_rs232c_txd(m_rs232c_device, ASSERT_LINE);
870825   }
871826
r18806r18807
873828   if (ART_TX_ENABLED && BIT(data, 3))
874829   {
875830      // force low when enabled and transmit enabled
876      px4_sio_txd(m_sio_device, CLEAR_LINE);
831      m_sio->tx_w(0);
877832      px4_rs232c_txd(m_rs232c_device, CLEAR_LINE);
878833   }
879834
r18806r18807
903858   m_centronics->strobe_w(!BIT(data, 0));
904859   m_centronics->init_prime_w(BIT(data, 1));
905860
906   px4_sio_pout(m_sio_device, BIT(data, 2));
861   m_sio->pout_w(BIT(data, 2));
907862
908863   // bit 3, cartridge reset
909864
r18806r18807
12101165// US ASCII keyboard
12111166static INPUT_PORTS_START( px4_h450a )
12121167   PORT_INCLUDE(px4_dips)
1213   PORT_INCLUDE(tf20)
12141168
12151169   PORT_START("keyboard_0")
12161170   PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(ESC)) // 00
r18806r18807
13131267/* item keyboard */
13141268static INPUT_PORTS_START( px4_h421a )
13151269   PORT_INCLUDE(px4_dips)
1316   PORT_INCLUDE(tf20)
13171270INPUT_PORTS_END
13181271
13191272#endif
r18806r18807
13891342   MCFG_CARTSLOT_ADD("capsule2")
13901343   MCFG_CARTSLOT_NOT_MANDATORY
13911344
1392   // tf20 floppy drive
1393   MCFG_TF20_ADD("floppy")
1345   // sio port
1346   MCFG_EPSON_SIO_ADD("sio")
13941347MACHINE_CONFIG_END
13951348
13961349static MACHINE_CONFIG_DERIVED( px4p, px4 )
trunk/src/mess/mess.mak
r18806r18807
11081108   $(MESS_DRIVERS)/hx20.o      \
11091109   $(MESS_DRIVERS)/lx800.o      \
11101110   $(MESS_MACHINE)/e05a03.o   \
1111   $(MESS_MACHINE)/epson_sio.o   \
11111112   $(MESS_MACHINE)/pf10.o      \
11121113   $(MESS_MACHINE)/tf20.o      \
11131114   $(MESS_DRIVERS)/px4.o      \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team