Previous 199869 Revisions Next

r19638 Tuesday 18th December, 2012 at 01:14:59 UTC by Angelo Salese
Added PC-9801-86 device for PC-9801 (OPNA)
[src/mess]mess.mak
[src/mess/drivers]pc9801.c
[src/mess/machine]pc9801_26.c pc9801_86.c* pc9801_86.h* pc9801_cbus.c* pc9801_cbus.h* pc9801_slot.c pc9801_slot.h

trunk/src/mess/machine/pc9801_slot.c
r19637r19638
1/**********************************************************************
2
3   Slot interface for PC-98xx family
4
5**********************************************************************/
6
7#include "pc9801_slot.h"
8
9
10
11//**************************************************************************
12//  GLOBAL VARIABLES
13//**************************************************************************
14
15const device_type PC9801BUS_SLOT = &device_creator<pc9801_slot_device>;
16
17
18
19//**************************************************************************
20//  DEVICE PC9801 CARD INTERFACE
21//**************************************************************************
22
23#if 0
24//-------------------------------------------------
25//  device_abc1600bus_card_interface - constructor
26//-------------------------------------------------
27
28device_pc9801bus_card_interface::device_pc9801bus_card_interface(const machine_config &mconfig, device_t &device)
29   : device_slot_card_interface(mconfig, device)
30{
31}
32
33
34//-------------------------------------------------
35//  ~device_abc1600bus_card_interface - destructor
36//-------------------------------------------------
37
38device_pc9801bus_card_interface::~device_pc9801bus_card_interface()
39{
40}
41#endif
42
43
44//**************************************************************************
45//  LIVE DEVICE
46//**************************************************************************
47
48//-------------------------------------------------
49//  pc9801_slot_device - constructor
50//-------------------------------------------------
51
52pc9801_slot_device::pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
53        device_t(mconfig, PC9801BUS_SLOT, "PC-9801 sound bus slot", tag, owner, clock),
54      device_slot_interface(mconfig, *this)
55{
56}
57
58
59//-------------------------------------------------
60//  device_config_complete - perform any
61//  operations now that the configuration is
62//  complete
63//-------------------------------------------------
64
65void pc9801_slot_device::device_config_complete()
66{
67   // ...
68}
69
70
71//-------------------------------------------------
72//  device_start - device-specific startup
73//-------------------------------------------------
74
75void pc9801_slot_device::device_start()
76{
77//   m_card = dynamic_cast<device_pc9801_slot_card_interface *>(get_card_device());
78}
79
80
81
trunk/src/mess/machine/pc9801_slot.h
r19637r19638
1/**********************************************************************
2
3
4**********************************************************************/
5
6#pragma once
7
8#ifndef __PC9801_SLOTBUS__
9#define __PC9801_SLOTBUS__
10
11#include "emu.h"
12
13
14//**************************************************************************
15//  CONSTANTS
16//**************************************************************************
17
18
19
20//**************************************************************************
21//  INTERFACE CONFIGURATION MACROS
22//**************************************************************************
23
24
25#define MCFG_PC9801BUS_SLOT_ADD(_tag, _slot_intf, _def_slot, _def_inp) \
26    MCFG_DEVICE_ADD(_tag, PC9801BUS_SLOT, 0) \
27   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
28
29
30
31//**************************************************************************
32//  TYPE DEFINITIONS
33//**************************************************************************
34
35
36
37
38//class pc9801_slot_device;
39
40#if 0
41class device_pc9801_slot_card_interface : public device_slot_card_interface
42{
43   friend class pc9801_slot_device;
44
45public:
46   // construction/destruction
47   device_pc9801_slot_card_interface(const machine_config &mconfig, device_t &device);
48   virtual ~device_pc9801_card_interface();
49};
50#endif
51
52// ======================> pc9801_slot_device
53
54class pc9801_slot_device : public device_t,
55                        public device_slot_interface
56{
57public:
58   // construction/destruction
59   pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
60
61   // device-level overrides
62   virtual void device_start();
63   virtual void device_config_complete();
64//private:
65//   device_pc9801_slot_card_interface *m_card;
66
67};
68
69
70// device type definition
71extern const device_type PC9801BUS_SLOT;
72
73
74
75#endif
trunk/src/mess/machine/pc9801_26.c
r19637r19638
22
33   NEC PC-9801-26 sound card
44
5   The legacy sound card, composed by a single YM2203
5   Legacy sound card for PC-98xx family, composed by a single YM2203
66
77***************************************************************************/
88
r19637r19638
149149         machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
150150         break;
151151      default:
152         fatalerror("IBM5160_MOTHERBOARD: Bus width %d not supported\n", buswidth);
152         fatalerror("PC-9801-26: Bus width %d not supported\n", buswidth);
153153         break;
154154   }
155155}
r19637r19638
179179{
180180   if((offset & 1) == 0)
181181   {
182      //if(m_has_opna)
183      //  return ym2608_r(m_opna, space, offset >> 1);
184
185182      return offset & 4 ? 0xff : ym2203_r(m_opn,space, offset >> 1);
186183   }
187184   else // odd
r19637r19638
194191
195192WRITE8_MEMBER(pc9801_26_device::pc9801_26_w)
196193{
197   if((offset & 1) == 0)
198   {
199      /*if(m_has_opna)
200            ym2608_w(m_opna,space, offset >> 1,data);
201        else */
202      if((offset & 4) == 0)
203         ym2203_w(m_opn,space, offset >> 1,data);
204   }
194   if((offset & 5) == 0)
195      ym2203_w(m_opn,space, offset >> 1,data);
205196   else // odd
206   {
207197      printf("PC9801-26: Write to undefined port [%02x] %02x\n",offset+0x188,data);
208   }
209198}
No newline at end of file
trunk/src/mess/machine/pc9801_cbus.c
r0r19638
1/**********************************************************************
2
3   CCBUS Slot interface for PC-98xx family
4
5**********************************************************************/
6
7#include "pc9801_cbus.h"
8
9
10
11//**************************************************************************
12//  GLOBAL VARIABLES
13//**************************************************************************
14
15const device_type PC9801CBUS_SLOT = &device_creator<pc9801_slot_device>;
16
17
18
19//**************************************************************************
20//  DEVICE PC9801 CARD INTERFACE
21//**************************************************************************
22
23#if 0
24//-------------------------------------------------
25//  device_pc9801cbus_card_interface - constructor
26//-------------------------------------------------
27
28device_pc9801cbus_card_interface::device_pc9801cbus_card_interface(const machine_config &mconfig, device_t &device)
29   : device_slot_card_interface(mconfig, device)
30{
31}
32
33
34//-------------------------------------------------
35//  ~device_pc9801cbus_card_interface - destructor
36//-------------------------------------------------
37
38device_pc9801cbus_card_interface::~device_pc9801cbus_card_interface()
39{
40}
41#endif
42
43
44//**************************************************************************
45//  LIVE DEVICE
46//**************************************************************************
47
48//-------------------------------------------------
49//  pc9801_slot_device - constructor
50//-------------------------------------------------
51
52pc9801_slot_device::pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
53        device_t(mconfig, PC9801CBUS_SLOT, "PC-9801 sound cbus slot", tag, owner, clock),
54      device_slot_interface(mconfig, *this)
55{
56}
57
58
59//-------------------------------------------------
60//  device_config_complete - perform any
61//  operations now that the configuration is
62//  complete
63//-------------------------------------------------
64
65void pc9801_slot_device::device_config_complete()
66{
67   // ...
68}
69
70
71//-------------------------------------------------
72//  device_start - device-specific startup
73//-------------------------------------------------
74
75void pc9801_slot_device::device_start()
76{
77//   m_card = dynamic_cast<device_pc9801_slot_card_interface *>(get_card_device());
78}
79
80
81
trunk/src/mess/machine/pc9801_cbus.h
r0r19638
1/**********************************************************************
2
3
4**********************************************************************/
5
6#pragma once
7
8#ifndef __PC9801_SLOTCBUS__
9#define __PC9801_SLOTCBUS__
10
11#include "emu.h"
12
13
14//**************************************************************************
15//  CONSTANTS
16//**************************************************************************
17
18
19
20//**************************************************************************
21//  INTERFACE CONFIGURATION MACROS
22//**************************************************************************
23
24
25#define MCFG_PC9801CBUS_SLOT_ADD(_tag, _slot_intf, _def_slot, _def_inp) \
26    MCFG_DEVICE_ADD(_tag, PC9801CBUS_SLOT, 0) \
27   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
28
29
30
31//**************************************************************************
32//  TYPE DEFINITIONS
33//**************************************************************************
34
35
36
37
38//class pc9801_slot_device;
39
40#if 0
41class device_pc9801_slot_card_interface : public device_slot_card_interface
42{
43   friend class pc9801_slot_device;
44
45public:
46   // construction/destruction
47   device_pc9801_slot_card_interface(const machine_config &mconfig, device_t &device);
48   virtual ~device_pc9801_card_interface();
49};
50#endif
51
52// ======================> pc9801_slot_device
53
54class pc9801_slot_device : public device_t,
55                        public device_slot_interface
56{
57public:
58   // construction/destruction
59   pc9801_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
60
61   // device-level overrides
62   virtual void device_start();
63   virtual void device_config_complete();
64//private:
65//   device_pc9801_slot_card_interface *m_card;
66
67};
68
69
70// device type definition
71extern const device_type PC9801CBUS_SLOT;
72
73
74
75#endif
trunk/src/mess/machine/pc9801_86.c
r0r19638
1/***************************************************************************
2
3   NEC PC-9801-86 sound card
4
5   Almost the same thing as PC-9801-86, but this one has YM2608 instead of
6   YM2203
7
8***************************************************************************/
9
10#include "emu.h"
11#include "machine/pc9801_86.h"
12#include "machine/pic8259.h"
13#include "sound/2608intf.h"
14
15#define MAIN_CLOCK_X1 XTAL_1_9968MHz
16
17//**************************************************************************
18//  GLOBAL VARIABLES
19//**************************************************************************
20
21// device type definition
22const device_type PC9801_86 = &device_creator<pc9801_86_device>;
23
24
25READ8_MEMBER(pc9801_86_device::opn_porta_r)
26{
27   if(m_joy_sel == 0x80)
28      return ioport("OPNA_PA1")->read();
29
30   if(m_joy_sel == 0xc0)
31      return ioport("OPNA_PA2")->read();
32
33//  0x81?
34//  printf("%02x\n",m_joy_sel);
35   return 0xff;
36}
37
38WRITE8_MEMBER(pc9801_86_device::opn_portb_w){ m_joy_sel = data; }
39
40static void pc9801_sound_irq( device_t *device, int irq )
41{
42//  pc9801_state *state = device->machine().driver_data<pc9801_state>();
43
44   /* TODO: seems to die very often */
45   pic8259_ir4_w(device->machine().device("pic8259_slave"), irq);
46}
47
48static const ym2608_interface pc98_ym2608_intf =
49{
50   {
51      AY8910_LEGACY_OUTPUT,
52      AY8910_DEFAULT_LOADS,
53      DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_86_device,opn_porta_r),
54      DEVCB_NULL,//(pc9801_state,opn_portb_r),
55      DEVCB_NULL,//(pc9801_state,opn_porta_w),
56      DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, pc9801_86_device,opn_portb_w),
57   },
58   pc9801_sound_irq
59};
60
61static MACHINE_CONFIG_FRAGMENT( pc9801_86_config )
62   MCFG_SPEAKER_STANDARD_MONO("mono")
63   MCFG_SOUND_ADD("opna", YM2608, MAIN_CLOCK_X1*4) // unknown clock / divider
64   MCFG_SOUND_CONFIG(pc98_ym2608_intf)
65   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
66MACHINE_CONFIG_END
67
68//-------------------------------------------------
69//  machine_config_additions - device-specific
70//  machine configurations
71//-------------------------------------------------
72
73machine_config_constructor pc9801_86_device::device_mconfig_additions() const
74{
75   return MACHINE_CONFIG_NAME( pc9801_86_config );
76}
77
78
79//-------------------------------------------------
80//  input_ports - device-specific input ports
81//-------------------------------------------------
82
83static INPUT_PORTS_START( pc9801_86 )
84   PORT_START("OPNA_PA1")
85   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Up")
86   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Down")
87   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Left")
88   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Right")
89   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Joystick Button 1")
90   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Joystick Button 2")
91   PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
92
93   PORT_START("OPNA_PA2")
94   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Up")
95   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Down")
96   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Left")
97   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Right")
98   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 1")
99   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 2")
100   PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
101INPUT_PORTS_END
102
103ioport_constructor pc9801_86_device::device_input_ports() const
104{
105   return INPUT_PORTS_NAME( pc9801_86 );
106}
107
108//**************************************************************************
109//  LIVE DEVICE
110//**************************************************************************
111
112//-------------------------------------------------
113//  pc9801_86_device - constructor
114//-------------------------------------------------
115
116pc9801_86_device::pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
117   : device_t(mconfig, PC9801_86, "pc9801_86", tag, owner, clock),
118//      m_maincpu(*owner, "maincpu"),
119      m_opna(*this, "opna")
120{
121
122}
123
124
125//-------------------------------------------------
126//  device_validity_check - perform validity checks
127//  on this device
128//-------------------------------------------------
129
130void pc9801_86_device::device_validity_check(validity_checker &valid) const
131{
132}
133
134//-------------------------------------------------
135//  device_start - device-specific startup
136//-------------------------------------------------
137
138void pc9801_86_device::install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler)
139{
140   int buswidth = machine().firstcpu->space_config(AS_IO)->m_databus_width;
141   switch(buswidth)
142   {
143      case 8:
144         machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0);
145         break;
146      case 16:
147         machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffff);
148         break;
149      case 32:
150         machine().firstcpu->space(AS_IO).install_readwrite_handler(start, end, mask, mirror, rhandler, whandler, 0xffffffff);
151         break;
152      default:
153         fatalerror("PC-9801-86: Bus width %d not supported\n", buswidth);
154         break;
155   }
156}
157
158
159void pc9801_86_device::device_start()
160{
161   install_device(0x0188, 0x018f, 0, 0, read8_delegate(FUNC(pc9801_86_device::pc9801_86_r), this), write8_delegate(FUNC(pc9801_86_device::pc9801_86_w), this) );
162//   install_device(0xa460, 0xa463, 0, 0, read8_delegate(FUNC(pc9801_86_device::pc9801_86_ext_r), this), write8_delegate(FUNC(pc9801_86_device::pc9801_86_ext_w), this) );
163}
164
165
166//-------------------------------------------------
167//  device_reset - device-specific reset
168//-------------------------------------------------
169
170void pc9801_86_device::device_reset()
171{
172}
173
174
175//**************************************************************************
176//  READ/WRITE HANDLERS
177//**************************************************************************
178
179
180READ8_MEMBER(pc9801_86_device::pc9801_86_r)
181{
182   if((offset & 1) == 0)
183      return ym2608_r(m_opna, space, offset >> 1);
184   else // odd
185   {
186      printf("PC9801-86: Read to undefined port [%02x]\n",offset+0x188);
187      return 0xff;
188   }
189}
190
191
192WRITE8_MEMBER(pc9801_86_device::pc9801_86_w)
193{
194   if((offset & 1) == 0)
195      ym2608_w(m_opna,space, offset >> 1,data);
196   else // odd
197      printf("PC9801-86: Write to undefined port [%02x] %02x\n",offset+0x188,data);
198}
199
200#if 0
201READ8_MEMBER( pc9801_86_device::pc9801_86_ext_r )
202{
203   if(offset == 0)
204   {
205      printf("OPNA EXT read ID [%02x]\n",offset);
206      return 0xff;
207   }
208
209   printf("OPNA EXT read unk [%02x]\n",offset);
210   return 0xff;
211}
212
213WRITE8_MEMBER( pc9801_86_device::pc9801_86_ext_w )
214{
215   if(offset == 0)
216   {
217      printf("OPNA EXT write mask %02x -> [%02x]\n",data,offset);
218      return;
219   }
220
221   printf("OPNA EXT write unk %02x -> [%02x]\n",data,offset);
222}
223#endif
trunk/src/mess/machine/pc9801_86.h
r0r19638
1/***************************************************************************
2
3Template for skeleton device
4
5***************************************************************************/
6
7
8#pragma once
9
10#ifndef __PC9801_86DEV_H__
11#define __PC9801_86DEV_H__
12
13#include "machine/pic8259.h"
14#include "sound/2608intf.h"
15
16#define MCFG_PC9801_86_SLOT_ADD(_tag, _slot_intf, _def_slot, _def_inp) \
17    MCFG_DEVICE_ADD(_tag, PC9801_86, 0) \
18   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> pc9801_86_device
26
27class pc9801_86_device : public device_t
28{
29public:
30   // construction/destruction
31   pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
32
33   // optional information overrides
34   virtual machine_config_constructor device_mconfig_additions() const;
35   virtual ioport_constructor device_input_ports() const;
36
37   DECLARE_READ8_MEMBER(opn_porta_r);
38   DECLARE_WRITE8_MEMBER(opn_portb_w);
39   DECLARE_READ8_MEMBER(pc9801_86_r);
40   DECLARE_WRITE8_MEMBER(pc9801_86_w);
41//   DECLARE_READ8_MEMBER(pc9801_86_ext_r);
42//   DECLARE_WRITE8_MEMBER(pc9801_86_ext_w);
43
44//   required_device<cpu_device>  m_maincpu;
45   required_device<ym2608_device>  m_opna;
46protected:
47   // device-level overrides
48   virtual void device_validity_check(validity_checker &valid) const;
49   virtual void device_start();
50   virtual void device_reset();
51   virtual void device_config_complete() { m_shortname = "pc9801_86"; }
52   void install_device(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_delegate rhandler, write8_delegate whandler);
53
54private:
55   UINT8 m_joy_sel;
56
57};
58
59
60// device type definition
61extern const device_type PC9801_86;
62
63
64
65//**************************************************************************
66//  GLOBAL VARIABLES
67//**************************************************************************
68
69
70
71#endif
trunk/src/mess/drivers/pc9801.c
r19637r19638
328328#include "machine/ram.h"
329329#include "formats/pc98fdi_dsk.h"
330330#include "machine/pc9801_26.h"
331#include "machine/pc9801_slot.h"
331#include "machine/pc9801_86.h"
332#include "machine/pc9801_cbus.h"
332333
333334
334335#define UPD1990A_TAG "upd1990a"
r19637r19638
507508   DECLARE_WRITE8_MEMBER(pc9821_vram256_w);
508509   DECLARE_READ8_MEMBER(opn_porta_r);
509510   DECLARE_WRITE8_MEMBER(opn_portb_w);
510   DECLARE_READ8_MEMBER(pc9801_ext_opna_r);
511   DECLARE_WRITE8_MEMBER(pc9801_ext_opna_w);
511//   DECLARE_READ8_MEMBER(pc9801_ext_opna_r);
512//   DECLARE_WRITE8_MEMBER(pc9801_ext_opna_w);
512513   DECLARE_WRITE8_MEMBER(pc9801rs_nmi_w);
513514   DECLARE_READ8_MEMBER(pc9801rs_midi_r);
514515
r19637r19638
20282029   }
20292030}
20302031
2031READ8_MEMBER( pc9801_state::pc9801_ext_opna_r )
2032{
2033   if(offset == 0)
2034   {
2035      printf("OPNA EXT read ID [%02x]\n",offset);
2036      return 0xff;
2037   }
20382032
2039   printf("OPNA EXT read unk [%02x]\n",offset);
2040   return 0xff;
2041}
2042
2043WRITE8_MEMBER( pc9801_state::pc9801_ext_opna_w )
2044{
2045   if(offset == 0)
2046   {
2047      printf("OPNA EXT write mask %02x -> [%02x]\n",data,offset);
2048      return;
2049   }
2050
2051   printf("OPNA EXT write unk %02x -> [%02x]\n",data,offset);
2052}
2053
2054
20552033WRITE8_MEMBER( pc9801_state::pc9801rs_nmi_w )
20562034{
20572035   if(offset == 0)
r19637r19638
20942072   AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffffffff)
20952073   AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w,    0xffffffff) //ROM/RAM bank
20962074   AM_RANGE(0x7fd8, 0x7fdf) AM_READWRITE8(pc9801_mouse_r,     pc9801_mouse_w,     0xffffffff) // <undefined> / mouse ppi8255 ports
2097   AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r,  pc9801_ext_opna_w,  0xffffffff)
2075//   AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r,  pc9801_ext_opna_w,  0xffffffff)
20982076   AM_RANGE(0xbfd8, 0xbfdf) AM_WRITE8(pc9801rs_mouse_freq_w, 0xffffffff)
20992077   AM_RANGE(0xe0d0, 0xe0d3) AM_READ8(pc9801rs_midi_r, 0xffffffff)
21002078ADDRESS_MAP_END
r19637r19638
21572135   AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffff)
21582136   AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w,    0xffff) //ROM/RAM bank
21592137   AM_RANGE(0x7fd8, 0x7fdf) AM_READWRITE8(pc9801_mouse_r,     pc9801_mouse_w,     0xffff) // <undefined> / mouse ppi8255 ports
2160   AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r,  pc9801_ext_opna_w,  0xffff)
2138//   AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r,  pc9801_ext_opna_w,  0xffff)
21612139
21622140ADDRESS_MAP_END
21632141
r19637r19638
24972475   AM_RANGE(0x8d1c, 0x8d1f) AM_READWRITE8(sdip_9_r,sdip_9_w,0xffffffff)
24982476   AM_RANGE(0x8e1c, 0x8e1f) AM_READWRITE8(sdip_a_r,sdip_a_w,0xffffffff)
24992477   AM_RANGE(0x8f1c, 0x8f1f) AM_READWRITE8(sdip_b_r,sdip_b_w,0xffffffff)
2500   AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r,  pc9801_ext_opna_w,  0xffffffff)
2478//   AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r,  pc9801_ext_opna_w,  0xffffffff)
25012479//  AM_RANGE(0xa460, 0xa46f) cs4231 PCM extended port / <undefined>
25022480//  AM_RANGE(0xbfdb, 0xbfdb) mouse timing port
25032481//  AM_RANGE(0xc0d0, 0xc0d3) MIDI port, option 0 / <undefined>
r19637r19638
32983276   SLOT_INTERFACE( "525hd", FLOPPY_525_HD )
32993277SLOT_INTERFACE_END
33003278
3301static SLOT_INTERFACE_START( pc9801_sound )
3279static SLOT_INTERFACE_START( pc9801_cbus )
33023280//   PC-9801-14
33033281   SLOT_INTERFACE( "pc9801_26", PC9801_26 )
3282   SLOT_INTERFACE( "pc9801_86", PC9801_86 )
33043283//   PC-9801-86
33053284//   PC-9801-26 + PC-9801-86 (?)
33063285//   PC-9801-86 + Chibi-Oto
r19637r19638
36093588   MCFG_TIMER_DRIVER_ADD_PERIODIC("mouse_timer", pc9801_state, mouse_irq_cb, attotime::from_hz(120))
36103589MACHINE_CONFIG_END
36113590
3591static MACHINE_CONFIG_FRAGMENT( pc9801_cbus )
3592   MCFG_PC9801CBUS_SLOT_ADD("cbus0", pc9801_cbus, NULL, NULL)
3593//   TODO: six max slots
3594MACHINE_CONFIG_END
36123595
36133596static MACHINE_CONFIG_START( pc9801, pc9801_state )
36143597   MCFG_CPU_ADD("maincpu", I8086, 5000000) //unknown clock
r19637r19638
36273610   MCFG_I8255_ADD( "ppi8255_prn", ppi_printer_intf )
36283611   MCFG_I8255_ADD( "ppi8255_fdd", ppi_fdd_intf )
36293612   MCFG_FRAGMENT_ADD(pc9801_mouse)
3613   MCFG_FRAGMENT_ADD(pc9801_cbus)
36303614   MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, pc9801_upd1990a_intf)
36313615   MCFG_I8251_ADD(UPD8251_TAG, pc9801_uart_interface)
36323616
r19637r19638
36393623
36403624   MCFG_SOFTWARE_LIST_ADD("disk_list","pc98")
36413625
3642   MCFG_PC9801BUS_SLOT_ADD("sound_bus", pc9801_sound, NULL, NULL)
36433626
36443627   #if 0
36453628   MCFG_RAM_ADD(RAM_TAG)
r19637r19638
37023685   MCFG_FLOPPY_DRIVE_ADD("upd765_2hd:0", pc9801_floppies, "525hd", 0, pc9801_state::floppy_formats)
37033686   MCFG_FLOPPY_DRIVE_ADD("upd765_2hd:1", pc9801_floppies, "525hd", 0, pc9801_state::floppy_formats)
37043687
3705   MCFG_PC9801BUS_SLOT_ADD("sound_bus", pc9801_sound, NULL, NULL)
3688   MCFG_FRAGMENT_ADD(pc9801_cbus)
37063689
37073690   MCFG_RAM_ADD(RAM_TAG)
37083691   MCFG_RAM_DEFAULT_SIZE("1664K")
r19637r19638
37673750   MCFG_FLOPPY_DRIVE_ADD("upd765_2hd:0", pc9801_floppies, "525hd", 0, pc9801_state::floppy_formats)
37683751   MCFG_FLOPPY_DRIVE_ADD("upd765_2hd:1", pc9801_floppies, "525hd", 0, pc9801_state::floppy_formats)
37693752
3770   MCFG_PC9801BUS_SLOT_ADD("sound_bus", pc9801_sound, NULL, NULL)
3753   MCFG_FRAGMENT_ADD(pc9801_cbus)
37713754
37723755   MCFG_RAM_ADD(RAM_TAG)
37733756   MCFG_RAM_DEFAULT_SIZE("1664K")
trunk/src/mess/mess.mak
r19637r19638
14721472
14731473$(MESSOBJ)/pc9801.a:         \
14741474   $(MESS_MACHINE)/pc9801_26.o   \
1475   $(MESS_MACHINE)/pc9801_slot.o   \
1475   $(MESS_MACHINE)/pc9801_86.o   \
1476   $(MESS_MACHINE)/pc9801_cbus.o   \
14761477
14771478$(MESSOBJ)/pcshare.a:         \
14781479   $(MESS_MACHINE)/pc_turbo.o   \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team