Previous 15994 Revisions Next

r11185 Friday 15th April, 2011 at 10:47:45 UTC by Curt Coder
Refactored the Commodore VIC-1112 IEEE488 cartridge to a C++ device. (no whatsnew)
[src/mess/drivers]vic20.c
[src/mess/machine]vic1112.c vic1112.h

src/mess/machine/vic1112.c
r11184r11185
1/**********************************************************************
1#include "vic1112.h"
22
3    Commodore VIC-1112 IEEE-488 cartridge emulation
43
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
74
8**********************************************************************/
5//**************************************************************************
6//  MACROS / CONSTANTS
7//**************************************************************************
98
10#include "emu.h"
11#include "vic1112.h"
12#include "cpu/m6502/m6502.h"
13#include "machine/6522via.h"
14#include "machine/ieee488.h"
15
16/***************************************************************************
17    PARAMETERS
18***************************************************************************/
19
209#define M6522_0_TAG      "u4"
2110#define M6522_1_TAG      "u5"
2211
23/***************************************************************************
24    TYPE DEFINITIONS
25***************************************************************************/
2612
27typedef struct _vic1112_t vic1112_t;
28struct _vic1112_t
29{
30   int via0_irq;                  /* VIA #0 interrupt request */
31   int via1_irq;                  /* VIA #1 interrupt request */
3213
33   /* devices */
34   via6522_device *via0;
35   via6522_device *via1;
36   via6522_device *bus;
37};
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
3817
39/***************************************************************************
40    INLINE FUNCTIONS
41***************************************************************************/
18const device_type VIC1112 = vic1112_device_config::static_alloc_device_config;
4219
43INLINE vic1112_t *get_safe_token(device_t *device)
44{
45   assert(device != NULL);
46   assert(device->type() == VIC1112);
47   return (vic1112_t *)downcast<legacy_device_base *>(device)->token();
48}
4920
50INLINE vic1112_config *get_safe_config(device_t *device)
51{
52   assert(device != NULL);
53   assert(device->type() == VIC1112);
54   return (vic1112_config *)downcast<const legacy_device_config_base &>(device->baseconfig()).inline_config();
55}
5621
57/***************************************************************************
58    IMPLEMENTATION
59***************************************************************************/
22//**************************************************************************
23//  DEVICE CONFIGURATION
24//**************************************************************************
6025
61/*-------------------------------------------------
62    vic1112_ieee488_srq_w - IEEE-488 service
63    request
64-------------------------------------------------*/
26GENERIC_DEVICE_CONFIG_SETUP(vic1112, "VIC-1112")
6527
66WRITE_LINE_DEVICE_HANDLER( vic1112_ieee488_srq_w )
28
29//-------------------------------------------------
30//  device_config_complete - perform any
31//  operations now that the configuration is
32//  complete
33//-------------------------------------------------
34
35void vic1112_device_config::device_config_complete()
6736{
68   vic1112_t *vic1112 = get_safe_token(device);
37   // inherit a copy of the static data
38   const vic1112_interface *intf = reinterpret_cast<const vic1112_interface *>(static_config());
39   if (intf != NULL)
40      *static_cast<vic1112_interface *>(this) = *intf;
6941
70   vic1112->bus->write_cb1(state);
42   // or initialize to defaults if none provided
43   else
44   {
45      fatalerror("Interface not provided!");
46   }
47
48   m_bus_tag = intf->m_bus_tag;
49
50   m_shortname = "vic1112";
7151}
7252
73/*-------------------------------------------------
74    via6522_interface vic1112_via0_intf
75-------------------------------------------------*/
7653
77static WRITE_LINE_DEVICE_HANDLER( via0_irq_w )
54//-------------------------------------------------
55//  ROM( vic1112 )
56//-------------------------------------------------
57
58ROM_START( vic1112 )
59   ROM_REGION( 0x800, VIC1112_TAG, 0 )
60   ROM_LOAD( "325329-03.u2", 0x000, 0x800, CRC(d37b6335) SHA1(828c965829d21c60e8c2d083caee045c639a270f) )
61ROM_END
62
63
64//-------------------------------------------------
65//  rom_region - device-specific ROM region
66//-------------------------------------------------
67
68const rom_entry *vic1112_device_config::device_rom_region() const
7869{
79   vic1112_t *vic1112 = get_safe_token(device->owner());
70   return ROM_NAME( vic1112 );
71}
8072
81   vic1112->via0_irq = state;
8273
83   device_set_input_line(device->machine().firstcpu, M6502_IRQ_LINE, (vic1112->via0_irq | vic1112->via1_irq) ? ASSERT_LINE : CLEAR_LINE);
74//-------------------------------------------------
75//  via6522_interface via0_intf
76//-------------------------------------------------
77
78WRITE_LINE_MEMBER( vic1112_device::via0_irq_w )
79{
80   m_via0_irq = state;
81
82   device_set_input_line(m_machine.firstcpu, M6502_IRQ_LINE, (m_via0_irq | m_via1_irq) ? ASSERT_LINE : CLEAR_LINE);
8483}
8584
86static READ8_DEVICE_HANDLER( via0_pb_r )
85
86READ8_MEMBER( vic1112_device::via0_pb_r )
8787{
8888   /*
8989
r11184r11185
100100
101101    */
102102
103   vic1112_t *vic1112 = get_safe_token(device->owner());
104103   UINT8 data = 0;
105104
106105   /* end or identify */
107   data |= ieee488_eoi_r(vic1112->bus) << 3;
106   data |= ieee488_eoi_r(m_bus) << 3;
108107
109108   /* data valid in */
110   data |= ieee488_dav_r(vic1112->bus) << 4;
109   data |= ieee488_dav_r(m_bus) << 4;
111110
112111   /* not ready for data in */
113   data |= ieee488_nrfd_r(vic1112->bus) << 5;
112   data |= ieee488_nrfd_r(m_bus) << 5;
114113
115114   /* not data accepted in */
116   data |= ieee488_ndac_r(vic1112->bus) << 6;
115   data |= ieee488_ndac_r(m_bus) << 6;
117116
118117   /* attention in */
119   data |= ieee488_atn_r(vic1112->bus) << 7;
118   data |= ieee488_atn_r(m_bus) << 7;
120119
121120   return data;
122121}
123122
124static WRITE8_DEVICE_HANDLER( via0_pb_w )
123
124WRITE8_MEMBER( vic1112_device::via0_pb_w )
125125{
126126   /*
127127
r11184r11185
138138
139139    */
140140
141   vic1112_t *vic1112 = get_safe_token(device->owner());
142
143141   /* data valid out */
144   ieee488_dav_w(vic1112->bus, device->owner(), BIT(data, 0));
142   ieee488_dav_w(m_bus, this, BIT(data, 0));
145143
146144   /* not ready for data out */
147   ieee488_nrfd_w(vic1112->bus, device->owner(), BIT(data, 1));
145   ieee488_nrfd_w(m_bus, this, BIT(data, 1));
148146
149147   /* not data accepted out */
150   ieee488_ndac_w(vic1112->bus, device->owner(), BIT(data, 2));
148   ieee488_ndac_w(m_bus, this, BIT(data, 2));
151149}
152150
153static const via6522_interface vic1112_via0_intf =
151
152static const via6522_interface via0_intf =
154153{
155154   DEVCB_NULL,
156   DEVCB_HANDLER(via0_pb_r),
155   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, via0_pb_r),
157156   DEVCB_NULL,
158157   DEVCB_NULL,
159158   DEVCB_NULL,
160159   DEVCB_NULL,
161160
162161   DEVCB_NULL,
163   DEVCB_HANDLER(via0_pb_w),
162   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, via0_pb_w),
164163   DEVCB_NULL,
165164   DEVCB_NULL,
166165   DEVCB_NULL,
167166   DEVCB_NULL,
168167
169   DEVCB_LINE(via0_irq_w)
168   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, via0_irq_w)
170169};
171170
172/*-------------------------------------------------
173    via6522_interface vic1112_via1_intf
174-------------------------------------------------*/
175171
176static WRITE_LINE_DEVICE_HANDLER( via1_irq_w )
172//-------------------------------------------------
173//  via6522_interface via1_intf
174//-------------------------------------------------
175
176WRITE_LINE_MEMBER( vic1112_device::via1_irq_w )
177177{
178   vic1112_t *vic1112 = get_safe_token(device->owner());
178   m_via1_irq = state;
179179
180   vic1112->via1_irq = state;
181
182   device_set_input_line(device->machine().firstcpu, M6502_IRQ_LINE, (vic1112->via0_irq | vic1112->via1_irq) ? ASSERT_LINE : CLEAR_LINE);
180   device_set_input_line(m_machine.firstcpu, M6502_IRQ_LINE, (m_via0_irq | m_via1_irq) ? ASSERT_LINE : CLEAR_LINE);
183181}
184182
185static READ8_DEVICE_HANDLER( dio_r )
183READ8_MEMBER( vic1112_device::dio_r )
186184{
187185   /*
188186
r11184r11185
199197
200198    */
201199
202   vic1112_t *vic1112 = get_safe_token(device->owner());
203
204   return ieee488_dio_r(vic1112->bus, 0);
200   return ieee488_dio_r(m_bus, 0);
205201}
206202
207static WRITE8_DEVICE_HANDLER( dio_w )
203
204WRITE8_MEMBER( vic1112_device::dio_w )
208205{
209206   /*
210207
r11184r11185
221218
222219    */
223220
224   vic1112_t *vic1112 = get_safe_token(device->owner());
225
226   ieee488_dio_w(vic1112->bus, device->owner(), data);
221   ieee488_dio_w(m_bus, this, data);
227222}
228223
229static WRITE_LINE_DEVICE_HANDLER( atn_w )
230{
231   vic1112_t *vic1112 = get_safe_token(device->owner());
232224
225WRITE_LINE_MEMBER( vic1112_device::atn_w )
226{
233227   /* attention out */
234   ieee488_atn_w(vic1112->bus, device->owner(), state);
228   ieee488_atn_w(m_bus, this, state);
235229}
236230
237static READ_LINE_DEVICE_HANDLER( srq_r )
238{
239   vic1112_t *vic1112 = get_safe_token(device->owner());
240231
232READ_LINE_MEMBER( vic1112_device::srq_r )
233{
241234   /* service request in */
242   return ieee488_srq_r(vic1112->bus);
235   return ieee488_srq_r(m_bus);
243236}
244237
245static WRITE_LINE_DEVICE_HANDLER( eoi_w )
246{
247   vic1112_t *vic1112 = get_safe_token(device->owner());
248238
239WRITE_LINE_MEMBER( vic1112_device::eoi_w )
240{
249241   /* end or identify out */
250   ieee488_eoi_w(vic1112->bus, device->owner(), state);
242   ieee488_eoi_w(m_bus, this, state);
251243}
252244
253static const via6522_interface vic1112_via1_intf =
245
246static const via6522_interface via1_intf =
254247{
255248   DEVCB_NULL,
256   DEVCB_HANDLER(dio_r),
249   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, dio_r),
257250   DEVCB_NULL,
258   DEVCB_LINE(srq_r),
251   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, srq_r),
259252   DEVCB_NULL,
260253   DEVCB_NULL,
261254
262   DEVCB_HANDLER(dio_w),
255   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, dio_w),
263256   DEVCB_NULL,
264257   DEVCB_NULL,
265258   DEVCB_NULL,
266   DEVCB_LINE(atn_w),
267   DEVCB_LINE(eoi_w),
259   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, atn_w),
260   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, eoi_w),
268261
269   DEVCB_LINE(via1_irq_w)
262   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, vic1112_device, via1_irq_w)
270263};
271264
272/*-------------------------------------------------
273    MACHINE_DRIVER( vic1112 )
274-------------------------------------------------*/
275265
266//-------------------------------------------------
267//  MACHINE_DRIVER( vic1112 )
268//-------------------------------------------------
269
276270static MACHINE_CONFIG_FRAGMENT( vic1112 )
277   MCFG_VIA6522_ADD(M6522_0_TAG, 0, vic1112_via0_intf)
278   MCFG_VIA6522_ADD(M6522_1_TAG, 0, vic1112_via1_intf)
271   MCFG_VIA6522_ADD(M6522_0_TAG, 0, via0_intf)
272   MCFG_VIA6522_ADD(M6522_1_TAG, 0, via1_intf)
279273MACHINE_CONFIG_END
280274
281/*-------------------------------------------------
282    ROM( vic1112 )
283-------------------------------------------------*/
284275
285ROM_START( vic1112 )
286   ROM_REGION( 0x800, VIC1112_TAG, ROMREGION_LOADBYNAME )
287   ROM_LOAD( "325329-03.u2", 0x000, 0x800, CRC(d37b6335) SHA1(828c965829d21c60e8c2d083caee045c639a270f) )
288ROM_END
276//-------------------------------------------------
277//  machine_config_additions - device-specific
278//  machine configurations
279//-------------------------------------------------
289280
290/*-------------------------------------------------
291    DEVICE_START( vic1112 )
292-------------------------------------------------*/
293
294static DEVICE_START( vic1112 )
281machine_config_constructor vic1112_device_config::device_mconfig_additions() const
295282{
296   vic1112_t *vic1112 = get_safe_token(device);
297   const vic1112_config *config = get_safe_config(device);
298   address_space *program = device->machine().firstcpu->memory().space(AS_PROGRAM);
283   return MACHINE_CONFIG_NAME( vic1112 );
284}
299285
300   /* find devices */
301   vic1112->via0 = device->subdevice<via6522_device>(M6522_0_TAG);
302   vic1112->via1 = device->subdevice<via6522_device>(M6522_1_TAG);
303   vic1112->bus = device->machine().device<via6522_device>(config->bus_tag);
304286
305   /* set VIA clocks */
306   vic1112->via0->set_unscaled_clock(device->machine().firstcpu->unscaled_clock());
307   vic1112->via1->set_unscaled_clock(device->machine().firstcpu->unscaled_clock());
308287
309   /* map VIAs to memory */
310   program->install_readwrite_handler(0x9800, 0x980f, 0, 0, read8_delegate_create(via6522_device, read, *vic1112->via0), write8_delegate_create(via6522_device, write, *vic1112->via0));
311   program->install_readwrite_handler(0x9810, 0x981f, 0, 0, read8_delegate_create(via6522_device, read, *vic1112->via1), write8_delegate_create(via6522_device, write, *vic1112->via1));
288//**************************************************************************
289//  LIVE DEVICE
290//**************************************************************************
312291
313   /* map ROM to memory */
314   program->install_rom(0xb000, 0xb7ff, device->machine().region("vic1112:vic1112")->base());
292//-------------------------------------------------
293//  vic1112_device - constructor
294//-------------------------------------------------
315295
316   /* ground REN */
317   ieee488_ren_w(vic1112->bus, device, 0);
318
319   /* register for state saving */
320   device->save_item(NAME(vic1112->via0_irq));
321   device->save_item(NAME(vic1112->via1_irq));
296vic1112_device::vic1112_device(running_machine &_machine, const vic1112_device_config &_config)
297    : device_t(_machine, _config),
298     m_via0(*this, M6522_0_TAG),
299     m_via1(*this, M6522_1_TAG),
300     m_bus(m_machine.device(_config.m_bus_tag)),
301      m_config(_config)
302{
322303}
323304
324/*-------------------------------------------------
325    DEVICE_RESET( vic1112 )
326-------------------------------------------------*/
327305
328static DEVICE_RESET( vic1112 )
306//-------------------------------------------------
307//  device_start - device-specific startup
308//-------------------------------------------------
309
310void vic1112_device::device_start()
329311{
330   vic1112_t *vic1112 = get_safe_token(device);
312   address_space *program = m_machine.firstcpu->memory().space(AS_PROGRAM);
331313
332   /* reset VIAs */
333   vic1112->via0->reset();
334   vic1112->via1->reset();
314   // map VIAs to VIC-20 address space
315   program->install_readwrite_handler(0x9800, 0x980f, 0, 0, read8_delegate_create(via6522_device, read, *m_via0), write8_delegate_create(via6522_device, write, *m_via0));
316   program->install_readwrite_handler(0x9810, 0x981f, 0, 0, read8_delegate_create(via6522_device, read, *m_via1), write8_delegate_create(via6522_device, write, *m_via1));
335317
336   /* _IFC */
337   ieee488_ifc_w(vic1112->bus, device, 0);
338   ieee488_ifc_w(vic1112->bus, device, 1);
318   // map ROM to VIC-20 address space
319   program->install_rom(0xb000, 0xb7ff, subregion(VIC1112_TAG)->base());
320
321   // state saving
322   save_item(NAME(m_via0_irq));
323   save_item(NAME(m_via1_irq));
339324}
340325
341/*-------------------------------------------------
342    DEVICE_GET_INFO( vic1112 )
343-------------------------------------------------*/
344326
345DEVICE_GET_INFO( vic1112 )
327//-------------------------------------------------
328//  device_reset - device-specific reset
329//-------------------------------------------------
330
331void vic1112_device::device_reset()
346332{
347   switch (state)
348   {
349      /* --- the following bits of info are returned as 64-bit signed integers --- */
350      case DEVINFO_INT_TOKEN_BYTES:               info->i = sizeof(vic1112_t);                        break;
351      case DEVINFO_INT_INLINE_CONFIG_BYTES:         info->i = sizeof(vic1112_config);                     break;
333   ieee488_ifc_w(m_bus, this, 0);
334   ieee488_ifc_w(m_bus, this, 1);
335}
352336
353      /* --- the following bits of info are returned as pointers --- */
354      case DEVINFO_PTR_ROM_REGION:               info->romregion = ROM_NAME(vic1112);                  break;
355      case DEVINFO_PTR_MACHINE_CONFIG:            info->machine_config = MACHINE_CONFIG_NAME(vic1112);      break;
356337
357      /* --- the following bits of info are returned as pointers to data or functions --- */
358      case DEVINFO_FCT_START:                     info->start = DEVICE_START_NAME(vic1112);               break;
359      case DEVINFO_FCT_STOP:                     /* Nothing */                                    break;
360      case DEVINFO_FCT_RESET:                     info->reset = DEVICE_RESET_NAME(vic1112);               break;
338//-------------------------------------------------
339//  srq_w -
340//-------------------------------------------------
361341
362      /* --- the following bits of info are returned as NULL-terminated strings --- */
363      case DEVINFO_STR_NAME:                     strcpy(info->s, "Commodore VIC-1112");                  break;
364      case DEVINFO_STR_FAMILY:                  strcpy(info->s, "Commodore VIC-20");                  break;
365      case DEVINFO_STR_VERSION:                  strcpy(info->s, "1.0");                              break;
366      case DEVINFO_STR_SOURCE_FILE:               strcpy(info->s, __FILE__);                           break;
367      case DEVINFO_STR_CREDITS:                  strcpy(info->s, "Copyright the MESS Team");             break;
368   }
342WRITE_LINE_MEMBER( vic1112_device::srq_w )
343{
344   m_via1->write_cb1(state);
369345}
370
371DEFINE_LEGACY_DEVICE(VIC1112, vic1112);
src/mess/machine/vic1112.h
r11184r11185
99
1010**********************************************************************/
1111
12#pragma once
13
1214#ifndef __VIC1112__
1315#define __VIC1112__
1416
17#define ADDRESS_MAP_MODERN
18
1519#include "emu.h"
20#include "cpu/m6502/m6502.h"
21#include "machine/6522via.h"
22#include "machine/ieee488.h"
23#include "machine/devhelpr.h"
1624
17/***************************************************************************
18    MACROS / CONSTANTS
19***************************************************************************/
2025
26
27//**************************************************************************
28//  MACROS / CONSTANTS
29//**************************************************************************
30
2131#define VIC1112_TAG   "vic1112"
2232
23DECLARE_LEGACY_DEVICE(VIC1112, vic1112);
2433
25#define MCFG_VIC1112_ADD(_bus_tag) \
26   MCFG_DEVICE_ADD(VIC1112_TAG, VIC1112, 0) \
27   MCFG_DEVICE_CONFIG_DATAPTR(vic1112_config, bus_tag, _bus_tag) \
2834
35//**************************************************************************
36//  INTERFACE CONFIGURATION MACROS
37//**************************************************************************
38
39#define MCFG_VIC1112_ADD(_config) \
40    MCFG_DEVICE_ADD(VIC1112_TAG, VIC1112, 0) \
41   MCFG_DEVICE_CONFIG(_config)
42
43
44#define VIC1112_INTERFACE(name) \
45   const vic1112_interface (name) =
46
47   
2948#define VIC1112_IEEE488 \
30   VIC1112_TAG, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_LINE(VIC1112_TAG, vic1112_ieee488_srq_w), DEVCB_NULL, DEVCB_NULL
49   VIC1112_TAG, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, \
50   DEVCB_DEVICE_LINE_MEMBER(VIC1112_TAG, vic1112_device, srq_w), DEVCB_NULL, DEVCB_NULL
3151
32/***************************************************************************
33    TYPE DEFINITIONS
34***************************************************************************/
3552
36typedef struct _vic1112_config vic1112_config;
37struct _vic1112_config
53//**************************************************************************
54//  TYPE DEFINITIONS
55//**************************************************************************
56
57// ======================> vic1112_interface
58
59struct vic1112_interface
3860{
39   const char *bus_tag;   /* bus device */
61   const char *m_bus_tag;
4062};
4163
42/***************************************************************************
43    PROTOTYPES
44***************************************************************************/
45/* IEEE-488 interface */
46WRITE_LINE_DEVICE_HANDLER( vic1112_ieee488_srq_w );
4764
65// ======================> vic1112_device_config
66
67class vic1112_device_config :   public device_config,
68                         public vic1112_interface
69{
70    friend class vic1112_device;
71
72    // construction/destruction
73    vic1112_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
74
75public:
76    // allocators
77    static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
78    virtual device_t *alloc_device(running_machine &machine) const;
79
80   // optional information overrides
81   virtual const rom_entry *device_rom_region() const;
82   virtual machine_config_constructor device_mconfig_additions() const;
83
84protected:
85    // device_config overrides
86    virtual void device_config_complete();
87   
88private:
89   const char *m_bus_tag;
90};
91
92
93// ======================> vic1112_device
94
95class vic1112_device :  public device_t
96{
97    friend class vic1112_device_config;
98
99    // construction/destruction
100    vic1112_device(running_machine &_machine, const vic1112_device_config &_config);
101
102public:
103   DECLARE_WRITE_LINE_MEMBER( srq_w );
104
105   // not really public, but won't compile otherwise
106   DECLARE_WRITE_LINE_MEMBER( via0_irq_w );
107   DECLARE_READ8_MEMBER( via0_pb_r );
108   DECLARE_WRITE8_MEMBER( via0_pb_w );
109   DECLARE_WRITE_LINE_MEMBER( via1_irq_w );
110   DECLARE_READ8_MEMBER( dio_r );
111   DECLARE_WRITE8_MEMBER( dio_w );
112   DECLARE_WRITE_LINE_MEMBER( atn_w );
113   DECLARE_READ_LINE_MEMBER( srq_r );
114   DECLARE_WRITE_LINE_MEMBER( eoi_w );
115
116protected:
117    // device-level overrides
118    virtual void device_start();
119   virtual void device_reset();
120
121private:
122   required_device<via6522_device> m_via0;
123   required_device<via6522_device> m_via1;
124   device_t *m_bus;
125
126   int m_via0_irq;
127   int m_via1_irq;
128
129    const vic1112_device_config &m_config;
130};
131
132
133// device type definition
134extern const device_type VIC1112;
135
136
137
48138#endif
src/mess/drivers/vic20.c
r11184r11185
5656
5757    TODO:
5858
59    - C1540 is unreliable (VIA timing issues?)
59    - C1540 is not working currently
6060    - clean up inputs
6161    - clean up VIA interface
6262    - access violation in mos6560.c
r11184r11185
6767    - restore key
6868    - light pen
6969    - VIC21 (built in 21K ram)
70    - new cart system (rpk)
7170
7271*/
7372
r11184r11185
442441
443442/* IEEE-488 Bus */
444443
444#ifdef INCLUDE_C2031
445445static IEEE488_DAISY( ieee488_daisy )
446446{
447447   { VIC1112_IEEE488 },
r11184r11185
449449   { NULL}
450450};
451451
452static VIC1112_INTERFACE( vic1112_intf )
453{
454   IEEE488_TAG
455};
456#endif
457
452458/* MOS6560 Interface */
453459
454460#define VC20ADDR2MOS6560ADDR(a) (((a) > 0x8000) ? ((a) & 0x1fff) : ((a) | 0x2000))
r11184r11185
692698   MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_config )
693699   MCFG_CBM_IEC_ADD(IEC_TAG, cbm_iec_daisy)
694700   MCFG_C1540_ADD(C1540_TAG, IEC_TAG, 8)
695/*
701#ifdef INCLUDE_C2031
696702    MCFG_IEEE488_ADD(IEEE488_TAG, ieee488_daisy)
697    MCFG_VIC1112_ADD(IEEE488_TAG)
703    MCFG_VIC1112_ADD(vic1112_intf)
698704    MCFG_C2031_ADD(C2031_TAG, IEEE488_TAG, 9)
699*/
705#endif
700706   MCFG_CARTSLOT_ADD("cart")
701707   MCFG_CARTSLOT_EXTENSION_LIST("20,40,60,70,a0,b0")
702708   MCFG_CARTSLOT_NOT_MANDATORY

Previous 15994 Revisions Next


© 1998-2018 The MESS Team