Previous 199869 Revisions Next

r20729 Monday 4th February, 2013 at 14:48:12 UTC by Curt Coder
(MESS) pet: Added user and memory expansion ports. [Curt Coder]
(MESS) cbm2: Added user port. [Curt Coder]
(MESS) Connected the CBM cassette software lists and readded quickloads. (nw)
[src/mess]mess.lst mess.mak
[src/mess/drivers]c64.c cbm2.c pet2001.c plus4.c vic20.c
[src/mess/includes]cbm2.h pet2001.h plus4.h
[src/mess/machine]c2n.c c2n.h cbm2user.c* cbm2user.h* cbmipt.c cbmipt.h petexp.c* petexp.h* petuser.c* petuser.h*

trunk/src/mess/machine/petuser.c
r0r20729
1/**********************************************************************
2
3    Commodore PET User Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "machine/petuser.h"
11
12
13
14//**************************************************************************
15//  GLOBAL VARIABLES
16//**************************************************************************
17
18const device_type PET_USER_PORT = &device_creator<pet_user_port_device>;
19
20
21
22//**************************************************************************
23//  CARD INTERFACE
24//**************************************************************************
25
26//-------------------------------------------------
27//  device_pet_user_port_interface - constructor
28//-------------------------------------------------
29
30device_pet_user_port_interface::device_pet_user_port_interface(const machine_config &mconfig, device_t &device)
31   : device_slot_card_interface(mconfig,device)
32{
33   m_slot = dynamic_cast<pet_user_port_device *>(device.owner());
34}
35
36
37//-------------------------------------------------
38//  ~device_pet_user_port_interface - destructor
39//-------------------------------------------------
40
41device_pet_user_port_interface::~device_pet_user_port_interface()
42{
43}
44
45
46
47//**************************************************************************
48//  LIVE DEVICE
49//**************************************************************************
50
51//-------------------------------------------------
52//  pet_user_port_device - constructor
53//-------------------------------------------------
54
55pet_user_port_device::pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
56      device_t(mconfig, PET_USER_PORT, "PET user port", tag, owner, clock),
57      device_slot_interface(mconfig, *this)
58{
59}
60
61
62//-------------------------------------------------
63//  pet_user_port_device - destructor
64//-------------------------------------------------
65
66pet_user_port_device::~pet_user_port_device()
67{
68}
69
70
71//-------------------------------------------------
72//  device_config_complete - perform any
73//  operations now that the configuration is
74//  complete
75//-------------------------------------------------
76
77void pet_user_port_device::device_config_complete()
78{
79   // inherit a copy of the static data
80   const pet_user_port_interface *intf = reinterpret_cast<const pet_user_port_interface *>(static_config());
81   if (intf != NULL)
82   {
83      *static_cast<pet_user_port_interface *>(this) = *intf;
84   }
85
86   // or initialize to defaults if none provided
87   else
88   {
89      memset(&m_out_ca1_cb, 0, sizeof(m_out_ca1_cb));
90      memset(&m_out_cb2_cb, 0, sizeof(m_out_cb2_cb));
91   }
92}
93
94
95//-------------------------------------------------
96//  device_start - device-specific startup
97//-------------------------------------------------
98
99void pet_user_port_device::device_start()
100{
101   m_cart = dynamic_cast<device_pet_user_port_interface *>(get_card_device());
102
103   // resolve callbacks
104   m_out_ca1_func.resolve(m_out_ca1_cb, *this);
105   m_out_cb2_func.resolve(m_out_cb2_cb, *this);
106}
107
108
109//-------------------------------------------------
110//  device_reset - device-specific reset
111//-------------------------------------------------
112
113void pet_user_port_device::device_reset()
114{
115}
116
117
118READ8_MEMBER( pet_user_port_device::pa_r ) { UINT8 data = 0xff; if (m_cart != NULL) data = m_cart->pet_pa_r(space, offset); return data; }
119WRITE8_MEMBER( pet_user_port_device::pa_w ) { if (m_cart != NULL) m_cart->pet_pa_w(space, offset, data); }
120READ_LINE_MEMBER( pet_user_port_device::ca1_r ) { int state = 1; if (m_cart != NULL) state = m_cart->pet_ca1_r(); return state; }
121WRITE_LINE_MEMBER( pet_user_port_device::ca1_w ) { if (m_cart != NULL) m_cart->pet_ca1_w(state); }
122READ_LINE_MEMBER( pet_user_port_device::cb2_r ) { int state = 1; if (m_cart != NULL) state = m_cart->pet_cb2_r(); return state; }
123WRITE_LINE_MEMBER( pet_user_port_device::cb2_w ) { if (m_cart != NULL) m_cart->pet_cb2_w(state); }
Property changes on: trunk/src/mess/machine/petuser.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/petuser.h
r0r20729
1/**********************************************************************
2
3    Commodore PET User Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9
10                    GND       1      A       GND
11                  VIDEO       2      B       CA1
12                _SRQ IN       3      C       PA0
13                    EOI       4      D       PA1
14                   DIAG       5      E       PA2
15           #2 CASS READ       6      F       PA3
16             CASS WRITE       7      H       PA4
17           #1 CASS READ       8      J       PA5
18             VERT DRIVE       9      K       PA6
19             HORZ DRIVE      10      L       PA7
20                    GND      11      M       CB2
21                    GND      12      N       GND
22
23**********************************************************************/
24
25#pragma once
26
27#ifndef __PET_USER_PORT__
28#define __PET_USER_PORT__
29
30#include "emu.h"
31
32
33
34//**************************************************************************
35//  CONSTANTS
36//**************************************************************************
37
38#define PET_USER_PORT_TAG       "user"
39
40
41
42//**************************************************************************
43//  INTERFACE CONFIGURATION MACROS
44//**************************************************************************
45
46#define PET_USER_PORT_INTERFACE(_name) \
47   const pet_user_port_interface (_name) =
48
49
50#define MCFG_PET_USER_PORT_ADD(_tag, _config, _slot_intf, _def_slot, _def_inp) \
51   MCFG_DEVICE_ADD(_tag, PET_USER_PORT, 0) \
52   MCFG_DEVICE_CONFIG(_config) \
53   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
54
55
56
57//**************************************************************************
58//  TYPE DEFINITIONS
59//**************************************************************************
60
61// ======================> pet_user_port_interface
62
63struct pet_user_port_interface
64{
65   devcb_write_line    m_out_ca1_cb;
66   devcb_write_line    m_out_cb2_cb;
67};
68
69
70// ======================> pet_user_port_device
71
72class device_pet_user_port_interface;
73
74class pet_user_port_device : public device_t,
75                        public pet_user_port_interface,
76                        public device_slot_interface
77{
78public:
79   // construction/destruction
80   pet_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
81   virtual ~pet_user_port_device();
82
83   // computer interface
84   DECLARE_READ8_MEMBER( pa_r );
85   DECLARE_WRITE8_MEMBER( pa_w );
86   DECLARE_READ_LINE_MEMBER( ca1_r );
87   DECLARE_WRITE_LINE_MEMBER( ca1_w );
88   DECLARE_READ_LINE_MEMBER( cb2_r );
89   DECLARE_WRITE_LINE_MEMBER( cb2_w );
90
91protected:
92   // device-level overrides
93   virtual void device_config_complete();
94   virtual void device_start();
95   virtual void device_reset();
96
97   devcb_resolved_write_line   m_out_ca1_func;
98   devcb_resolved_write_line   m_out_cb2_func;
99
100   device_pet_user_port_interface *m_cart;
101};
102
103
104// ======================> device_pet_user_port_interface
105
106// class representing interface-specific live pet_expansion card
107class device_pet_user_port_interface : public device_slot_card_interface
108{
109public:
110   // construction/destruction
111   device_pet_user_port_interface(const machine_config &mconfig, device_t &device);
112   virtual ~device_pet_user_port_interface();
113
114   virtual UINT8 pet_pa_r(address_space &space, offs_t offset) { return 0xff; };
115   virtual void pet_pa_w(address_space &space, offs_t offset, UINT8 data) { };
116
117   virtual int pet_ca1_r() { return 1; };
118   virtual void pet_ca1_w(int state) { };
119   virtual int pet_cb2_r() { return 1; };
120   virtual void pet_cb2_w(int state) { };
121
122protected:
123   pet_user_port_device *m_slot;
124};
125
126
127// device type definition
128extern const device_type PET_USER_PORT;
129
130
131
132#endif
Property changes on: trunk/src/mess/machine/petuser.h
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/cbm2user.c
r0r20729
1/**********************************************************************
2
3    Commodore CBM-II User Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "machine/cbm2user.h"
11
12
13
14//**************************************************************************
15//  GLOBAL VARIABLES
16//**************************************************************************
17
18const device_type CBM2_USER_PORT = &device_creator<cbm2_user_port_device>;
19
20
21
22//**************************************************************************
23//  CARD INTERFACE
24//**************************************************************************
25
26//-------------------------------------------------
27//  device_cbm2_user_port_interface - constructor
28//-------------------------------------------------
29
30device_cbm2_user_port_interface::device_cbm2_user_port_interface(const machine_config &mconfig, device_t &device)
31   : device_slot_card_interface(mconfig,device)
32{
33   m_slot = dynamic_cast<cbm2_user_port_device *>(device.owner());
34}
35
36
37//-------------------------------------------------
38//  ~device_cbm2_user_port_interface - destructor
39//-------------------------------------------------
40
41device_cbm2_user_port_interface::~device_cbm2_user_port_interface()
42{
43}
44
45
46
47//**************************************************************************
48//  LIVE DEVICE
49//**************************************************************************
50
51//-------------------------------------------------
52//  cbm2_user_port_device - constructor
53//-------------------------------------------------
54
55cbm2_user_port_device::cbm2_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
56      device_t(mconfig, CBM2_USER_PORT, "CBM2 user port", tag, owner, clock),
57      device_slot_interface(mconfig, *this)
58{
59}
60
61
62//-------------------------------------------------
63//  cbm2_user_port_device - destructor
64//-------------------------------------------------
65
66cbm2_user_port_device::~cbm2_user_port_device()
67{
68}
69
70
71//-------------------------------------------------
72//  device_config_complete - perform any
73//  operations now that the configuration is
74//  complete
75//-------------------------------------------------
76
77void cbm2_user_port_device::device_config_complete()
78{
79   // inherit a copy of the static data
80   const cbm2_user_port_interface *intf = reinterpret_cast<const cbm2_user_port_interface *>(static_config());
81   if (intf != NULL)
82   {
83      *static_cast<cbm2_user_port_interface *>(this) = *intf;
84   }
85
86   // or initialize to defaults if none provided
87   else
88   {
89      memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
90      memset(&m_out_sp_cb, 0, sizeof(m_out_sp_cb));
91      memset(&m_out_cnt_cb, 0, sizeof(m_out_cnt_cb));
92      memset(&m_out_flag_cb, 0, sizeof(m_out_flag_cb));
93   }
94}
95
96
97//-------------------------------------------------
98//  device_start - device-specific startup
99//-------------------------------------------------
100
101void cbm2_user_port_device::device_start()
102{
103   m_cart = dynamic_cast<device_cbm2_user_port_interface *>(get_card_device());
104
105   // resolve callbacks
106   m_out_irq_func.resolve(m_out_irq_cb, *this);
107   m_out_sp_func.resolve(m_out_sp_cb, *this);
108   m_out_cnt_func.resolve(m_out_cnt_cb, *this);
109   m_out_flag_func.resolve(m_out_flag_cb, *this);
110}
111
112
113//-------------------------------------------------
114//  device_reset - device-specific reset
115//-------------------------------------------------
116
117void cbm2_user_port_device::device_reset()
118{
119}
120
121
122READ8_MEMBER( cbm2_user_port_device::d1_r ) { UINT8 data = 0xff; if (m_cart != NULL) data = m_cart->cbm2_d1_r(space, offset); return data; }
123WRITE8_MEMBER( cbm2_user_port_device::d1_w ) { if (m_cart != NULL) m_cart->cbm2_d1_w(space, offset, data); }
124READ8_MEMBER( cbm2_user_port_device::d2_r ) { UINT8 data = 0xff; if (m_cart != NULL) data = m_cart->cbm2_d2_r(space, offset); return data; }
125WRITE8_MEMBER( cbm2_user_port_device::d2_w ) { if (m_cart != NULL) m_cart->cbm2_d2_w(space, offset, data); }
126READ_LINE_MEMBER( cbm2_user_port_device::pb2_r ) { return m_cart ? m_cart->cbm2_pb2_r() : 1; }
127WRITE_LINE_MEMBER( cbm2_user_port_device::pb2_w ) { if (m_cart != NULL) m_cart->cbm2_pb2_w(state); }
128READ_LINE_MEMBER( cbm2_user_port_device::pb3_r ) { return m_cart ? m_cart->cbm2_pb3_r() : 1; }
129WRITE_LINE_MEMBER( cbm2_user_port_device::pb3_w ) { if (m_cart != NULL) m_cart->cbm2_pb3_w(state); }
130WRITE_LINE_MEMBER( cbm2_user_port_device::pc_w ) { if (m_cart != NULL) m_cart->cbm2_pc_w(state); }
131WRITE_LINE_MEMBER( cbm2_user_port_device::cnt_w ) { if (m_cart != NULL) m_cart->cbm2_cnt_w(state); }
132WRITE_LINE_MEMBER( cbm2_user_port_device::sp_w ) { if (m_cart != NULL) m_cart->cbm2_sp_w(state); }
Property changes on: trunk/src/mess/machine/cbm2user.c
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/machine/cbm2user.h
r0r20729
1/**********************************************************************
2
3    Commodore CBM-II User Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9
10**********************************************************************/
11
12#pragma once
13
14#ifndef __CBM2_USER_PORT__
15#define __CBM2_USER_PORT__
16
17#include "emu.h"
18
19
20
21//**************************************************************************
22//  CONSTANTS
23//**************************************************************************
24
25#define CBM2_USER_PORT_TAG       "user"
26
27
28
29//**************************************************************************
30//  INTERFACE CONFIGURATION MACROS
31//**************************************************************************
32
33#define CBM2_USER_PORT_INTERFACE(_name) \
34   const cbm2_user_port_interface (_name) =
35
36
37#define MCFG_CBM2_USER_PORT_ADD(_tag, _config, _slot_intf, _def_slot, _def_inp) \
38   MCFG_DEVICE_ADD(_tag, CBM2_USER_PORT, 0) \
39   MCFG_DEVICE_CONFIG(_config) \
40   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
41
42
43
44//**************************************************************************
45//  TYPE DEFINITIONS
46//**************************************************************************
47
48// ======================> cbm2_user_port_interface
49
50struct cbm2_user_port_interface
51{
52   devcb_write_line    m_out_irq_cb;
53   devcb_write_line    m_out_sp_cb;
54   devcb_write_line    m_out_cnt_cb;
55   devcb_write_line    m_out_flag_cb;
56};
57
58
59// ======================> cbm2_user_port_device
60
61class device_cbm2_user_port_interface;
62
63class cbm2_user_port_device : public device_t,
64                        public cbm2_user_port_interface,
65                        public device_slot_interface
66{
67public:
68   // construction/destruction
69   cbm2_user_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
70   virtual ~cbm2_user_port_device();
71
72   // computer interface
73   DECLARE_READ8_MEMBER( d1_r );
74   DECLARE_WRITE8_MEMBER( d1_w );
75   DECLARE_READ8_MEMBER( d2_r );
76   DECLARE_WRITE8_MEMBER( d2_w );
77   DECLARE_READ_LINE_MEMBER( pb2_r );
78   DECLARE_WRITE_LINE_MEMBER( pb2_w );
79   DECLARE_READ_LINE_MEMBER( pb3_r );
80   DECLARE_WRITE_LINE_MEMBER( pb3_w );
81   DECLARE_WRITE_LINE_MEMBER( pc_w );
82   DECLARE_WRITE_LINE_MEMBER( cnt_w );
83   DECLARE_WRITE_LINE_MEMBER( sp_w );
84
85protected:
86   // device-level overrides
87   virtual void device_config_complete();
88   virtual void device_start();
89   virtual void device_reset();
90
91   devcb_resolved_write_line   m_out_irq_func;
92   devcb_resolved_write_line   m_out_sp_func;
93   devcb_resolved_write_line   m_out_cnt_func;
94   devcb_resolved_write_line   m_out_flag_func;
95
96   device_cbm2_user_port_interface *m_cart;
97};
98
99
100// ======================> device_cbm2_user_port_interface
101
102// class representing interface-specific live cbm2_expansion card
103class device_cbm2_user_port_interface : public device_slot_card_interface
104{
105public:
106   // construction/destruction
107   device_cbm2_user_port_interface(const machine_config &mconfig, device_t &device);
108   virtual ~device_cbm2_user_port_interface();
109
110   virtual UINT8 cbm2_d1_r(address_space &space, offs_t offset) { return 0xff; };
111   virtual void cbm2_d1_w(address_space &space, offs_t offset, UINT8 data) { };
112
113   virtual UINT8 cbm2_d2_r(address_space &space, offs_t offset) { return 0xff; };
114   virtual void cbm2_d2_w(address_space &space, offs_t offset, UINT8 data) { };
115
116   virtual int cbm2_pb2_r() { return 1; }
117   virtual void cbm2_pb2_w(int state) { };
118   virtual int cbm2_pb3_r() { return 1; }
119   virtual void cbm2_pb3_w(int state) { };
120
121   virtual void cbm2_pc_w(int state) { };
122   virtual void cbm2_cnt_w(int state) { };
123   virtual void cbm2_sp_w(int state) { };
124
125protected:
126   cbm2_user_port_device *m_slot;
127};
128
129
130// device type definition
131extern const device_type CBM2_USER_PORT;
132
133
134
135#endif
Property changes on: trunk/src/mess/machine/cbm2user.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/machine/cbmipt.c
r20728r20729
10231023   PORT_CONFSETTING(   0x01, DEF_STR( On ) )
10241024INPUT_PORTS_END
10251025
1026SLOT_INTERFACE_START( pet_expansion_cards )
1027   //SLOT_INTERFACE("64k", PET_64K)
1028SLOT_INTERFACE_END
10261029
1030SLOT_INTERFACE_START( pet_user_port_cards )
1031SLOT_INTERFACE_END
1032
10271033SLOT_INTERFACE_START( cbm2_expansion_cards )
10281034   SLOT_INTERFACE("24k", CBM2_24K)
10291035   SLOT_INTERFACE_INTERNAL("standard", CBM2_STD)
10301036   SLOT_INTERFACE_INTERNAL("graphic", CBM2_GRAPHIC)
10311037SLOT_INTERFACE_END
10321038
1039SLOT_INTERFACE_START( cbm2_user_port_cards )
1040SLOT_INTERFACE_END
1041
10331042SLOT_INTERFACE_START( cbm_datassette_devices )
1043   SLOT_INTERFACE("c2n", C2N)
10341044   SLOT_INTERFACE("c1530", C1530)
10351045SLOT_INTERFACE_END
10361046
trunk/src/mess/machine/cbmipt.h
r20728r20729
150150
151151
152152
153SLOT_INTERFACE_EXTERN( pet_expansion_cards );
154SLOT_INTERFACE_EXTERN( pet_user_port_cards );
153155SLOT_INTERFACE_EXTERN( cbm2_expansion_cards );
156SLOT_INTERFACE_EXTERN( cbm2_user_port_cards );
154157SLOT_INTERFACE_EXTERN( cbm_datassette_devices );
155158SLOT_INTERFACE_EXTERN( cbm_iec_devices );
156159SLOT_INTERFACE_EXTERN( sx1541_iec_devices );
trunk/src/mess/machine/c2n.c
r20728r20729
2323//  DEVICE DEFINITIONS
2424//**************************************************************************
2525
26const device_type C2N = &device_creator<c2n_device>;
2627const device_type C1530 = &device_creator<c1530_device>;
2728const device_type C1531 = &device_creator<c1531_device>;
2829
r20728r20729
3637   cbm_cassette_formats,
3738   NULL,
3839   (cassette_state) (CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED),
39   NULL,
40   "cbm_cass",
4041   NULL
4142};
4243
r20728r20729
7778{
7879}
7980
81c2n_device::c2n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
82   : device_t(mconfig, C2N, "C2N", tag, owner, clock),
83      device_pet_datassette_port_interface(mconfig, *this),
84      m_cassette(*this, CASSETTE_TAG)
85{
86}
8087
88
8189//-------------------------------------------------
8290//  c1530_device - constructor
8391//-------------------------------------------------
trunk/src/mess/machine/c2n.h
r20728r20729
3232public:
3333   // construction/destruction
3434   c2n_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
35   c2n_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3536
3637   // optional information overrides
3738   virtual machine_config_constructor device_mconfig_additions() const;
r20728r20729
7778
7879
7980// device type definition
81extern const device_type C2N;
8082extern const device_type C1530;
8183extern const device_type C1531;
8284
trunk/src/mess/machine/petexp.c
r0r20729
1/**********************************************************************
2
3    Commodore PET Memory Expansion Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "machine/petexp.h"
11
12
13
14//**************************************************************************
15//  MACROS/CONSTANTS
16//**************************************************************************
17
18#define LOG 0
19
20
21
22//**************************************************************************
23//  DEVICE DEFINITIONS
24//**************************************************************************
25
26const device_type PET_EXPANSION_SLOT = &device_creator<pet_expansion_slot_device>;
27
28
29
30//**************************************************************************
31//  LIVE DEVICE
32//**************************************************************************
33
34//-------------------------------------------------
35//  pet_expansion_slot_device - constructor
36//-------------------------------------------------
37
38pet_expansion_slot_device::pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
39   device_t(mconfig, PET_EXPANSION_SLOT, "PET memory expansion port", tag, owner, clock),
40   device_slot_interface(mconfig, *this)
41{
42}
43
44
45//-------------------------------------------------
46//  pet_expansion_slot_device - destructor
47//-------------------------------------------------
48
49pet_expansion_slot_device::~pet_expansion_slot_device()
50{
51}
52
53
54//-------------------------------------------------
55//  device_pet_expansion_card_interface - constructor
56//-------------------------------------------------
57
58device_pet_expansion_card_interface::device_pet_expansion_card_interface(const machine_config &mconfig, device_t &device)
59   : device_slot_card_interface(mconfig, device)
60{
61   m_slot = dynamic_cast<pet_expansion_slot_device *>(device.owner());
62}
63
64
65//-------------------------------------------------
66//  ~device_pet_expansion_card_interface - destructor
67//-------------------------------------------------
68
69device_pet_expansion_card_interface::~device_pet_expansion_card_interface()
70{
71}
72
73
74//-------------------------------------------------
75//  device_start - device-specific startup
76//-------------------------------------------------
77
78void pet_expansion_slot_device::device_start()
79{
80   m_card = dynamic_cast<device_pet_expansion_card_interface *>(get_card_device());
81}
82
83
84//-------------------------------------------------
85//  device_reset - device-specific reset
86//-------------------------------------------------
87
88void pet_expansion_slot_device::device_reset()
89{
90   if (m_card != NULL)
91   {
92      get_card_device()->reset();
93   }
94}
95
96
97//-------------------------------------------------
98//  norom_r - NO ROM read
99//-------------------------------------------------
100
101int pet_expansion_slot_device::norom_r(address_space &space, offs_t offset, int sel)
102{
103   return m_card ? m_card->pet_norom_r(space, offset, sel) : 1;
104}
105
106
107//-------------------------------------------------
108//  read - cartridge data read
109//-------------------------------------------------
110
111UINT8 pet_expansion_slot_device::read(address_space &space, offs_t offset, UINT8 data, int sel)
112{
113   if (m_card != NULL)
114   {
115      data = m_card->pet_bd_r(space, offset, data, sel);
116   }
117
118   return data;
119}
120
121
122//-------------------------------------------------
123//  write - cartridge data write
124//-------------------------------------------------
125
126void pet_expansion_slot_device::write(address_space &space, offs_t offset, UINT8 data, int sel)
127{
128   if (m_card != NULL)
129   {
130      m_card->pet_bd_w(space, offset, data, sel);
131   }
132}
133
134
135//-------------------------------------------------
136//  phi2 - system clock frequency
137//-------------------------------------------------
138
139int pet_expansion_slot_device::phi2()
140{
141   return clock();
142}
Property changes on: trunk/src/mess/machine/petexp.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/petexp.h
r0r20729
1/**********************************************************************
2
3    Commodore PET Memory Expansion Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9
10**********************************************************************/
11
12#pragma once
13
14#ifndef __PET_EXPANSION_SLOT__
15#define __PET_EXPANSION_SLOT__
16
17#include "emu.h"
18
19
20
21//**************************************************************************
22//  CONSTANTS
23//**************************************************************************
24
25#define PET_EXPANSION_SLOT_TAG     "exp"
26
27
28
29//**************************************************************************
30//  INTERFACE CONFIGURATION MACROS
31//**************************************************************************
32
33#define MCFG_PET_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot, _def_inp) \
34   MCFG_DEVICE_ADD(_tag, PET_EXPANSION_SLOT, _clock) \
35   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
36
37
38
39//**************************************************************************
40//  TYPE DEFINITIONS
41//**************************************************************************
42
43// ======================> pet_expansion_slot_device
44
45class device_pet_expansion_card_interface;
46
47class pet_expansion_slot_device : public device_t,
48                           public device_slot_interface
49{
50public:
51   // construction/destruction
52   pet_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
53   virtual ~pet_expansion_slot_device();
54
55   // computer interface
56   int norom_r(address_space &space, offs_t offset, int sel);
57   UINT8 read(address_space &space, offs_t offset, UINT8 data, int sel);
58   void write(address_space &space, offs_t offset, UINT8 data, int sel);
59
60   // cartridge interface
61   int phi2();
62
63protected:
64   // device-level overrides
65   virtual void device_config_complete() { m_shortname = "petexp"; }
66   virtual void device_start();
67   virtual void device_reset();
68
69   device_pet_expansion_card_interface *m_card;
70};
71
72
73// ======================> device_pet_expansion_card_interface
74
75class device_pet_expansion_card_interface : public device_slot_card_interface
76{
77   friend class pet_expansion_slot_device;
78
79public:
80   // construction/destruction
81   device_pet_expansion_card_interface(const machine_config &mconfig, device_t &device);
82   virtual ~device_pet_expansion_card_interface();
83
84protected:
85   // runtime
86   virtual int pet_norom_r(address_space &space, offs_t offset, int sel) { return 1; }
87   virtual UINT8 pet_bd_r(address_space &space, offs_t offset, UINT8 data, int sel) { return data; };
88   virtual void pet_bd_w(address_space &space, offs_t offset, UINT8 data, int sel) { };
89
90   pet_expansion_slot_device *m_slot;
91};
92
93
94// device type definition
95extern const device_type PET_EXPANSION_SLOT;
96
97
98
99#endif
Property changes on: trunk/src/mess/machine/petexp.h
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/includes/plus4.h
r20728r20729
121121   DECLARE_WRITE8_MEMBER( exp_dma_w );
122122   DECLARE_WRITE_LINE_MEMBER( exp_irq_w );
123123
124   enum
125   {
126      CS0_BASIC = 0,
127      CS0_FUNCTION_LO,
128      CS0_C1_LOW,
129      CS0_C2_LOW
130   };
131
132   enum
133   {
134      CS1_KERNAL = 0,
135      CS1_FUNCTION_HI,
136      CS1_C1_HIGH,
137      CS1_C2_HIGH
138   };
139
124140   // memory state
125141   UINT8 m_addr;
126142
trunk/src/mess/includes/pet2001.h
r20728r20729
11#pragma once
22
3#ifndef __PET2001__
4#define __PET2001__
3#ifndef __PET__
4#define __PET__
55
66#include "emu.h"
77#include "cpu/m6502/m6502.h"
8#include "formats/cbm_snqk.h"
89#include "machine/6821pia.h"
910#include "machine/6522via.h"
1011#include "machine/cbmipt.h"
1112#include "machine/ieee488.h"
1213#include "machine/petcass.h"
14#include "machine/petexp.h"
15#include "machine/petuser.h"
1316#include "machine/ram.h"
1417#include "sound/speaker.h"
1518#include "video/mc6845.h"
r20728r20729
2225#define M6809_TAG      "u4"
2326#define SCREEN_TAG      "screen"
2427
25class pet2001_state : public driver_device
28class pet_state : public driver_device
2629{
2730public:
28   pet2001_state(const machine_config &mconfig, device_type type, const char *tag)
31   pet_state(const machine_config &mconfig, device_type type, const char *tag)
2932      : driver_device(mconfig, type, tag),
3033         m_maincpu(*this, M6502_TAG),
3134         m_via(*this, M6522_TAG),
r20728r20729
3538         m_ieee(*this, IEEE488_TAG),
3639         m_cassette(*this, PET_DATASSETTE_PORT_TAG),
3740         m_cassette2(*this, PET_DATASSETTE_PORT2_TAG),
38         //m_exp(*this, PET_EXPANSION_SLOT_TAG),
39         //m_user(*this, PET_USER_PORT_TAG),
41         m_exp(*this, PET_EXPANSION_SLOT_TAG),
42         m_user(*this, PET_USER_PORT_TAG),
4043         m_speaker(*this, SPEAKER_TAG),
4144         m_ram(*this, RAM_TAG),
4245         m_rom(*this, M6502_TAG),
r20728r20729
7376   required_device<ieee488_device> m_ieee;
7477   required_device<pet_datassette_port_device> m_cassette;
7578   required_device<pet_datassette_port_device> m_cassette2;
76   //required_device<pet_expansion_slot_device> m_exp;
77   //required_device<pet_user_port_device> m_user;
79   required_device<pet_expansion_slot_device> m_exp;
80   required_device<pet_user_port_device> m_user;
7881   optional_device<speaker_sound_device> m_speaker;
7982   required_device<ram_device> m_ram;
8083   required_memory_region m_rom;
r20728r20729
166169};
167170
168171
169class pet2001b_state : public pet2001_state
172class pet2001b_state : public pet_state
170173{
171174public:
172175   pet2001b_state(const machine_config &mconfig, device_type type, const char *tag)
173      : pet2001_state(mconfig, type, tag)
176      : pet_state(mconfig, type, tag)
174177   { }
175178
176179   DECLARE_READ8_MEMBER( pia1_pb_r );
trunk/src/mess/includes/cbm2.h
r20728r20729
1111#include "machine/6525tpi.h"
1212#include "machine/6551acia.h"
1313#include "machine/cbm2exp.h"
14#include "machine/cbm2user.h"
1415#include "machine/cbmipt.h"
1516#include "machine/ds75160a.h"
1617#include "machine/ds75161a.h"
r20728r20729
6768         m_joy1(*this, CONTROL1_TAG),
6869         m_joy2(*this, CONTROL2_TAG),
6970         m_exp(*this, CBM2_EXPANSION_SLOT_TAG),
71         m_user(*this, CBM2_USER_PORT_TAG),
7072         m_ram(*this, RAM_TAG),
7173         m_cassette(*this, PET_DATASSETTE_PORT_TAG),
7274         m_ieee(*this, IEEE488_TAG),
r20728r20729
122124   required_device<vcs_control_port_device> m_joy1;
123125   required_device<vcs_control_port_device> m_joy2;
124126   required_device<cbm2_expansion_slot_device> m_exp;
127   required_device<cbm2_user_port_device> m_user;
125128   required_device<ram_device> m_ram;
126129   required_device<pet_datassette_port_device> m_cassette;
127130   required_device<ieee488_device> m_ieee;
r20728r20729
195198   DECLARE_READ8_MEMBER( cia_pa_r );
196199   DECLARE_WRITE8_MEMBER( cia_pa_w );
197200   DECLARE_READ8_MEMBER( cia_pb_r );
198   DECLARE_WRITE8_MEMBER( cia_pb_w );
199201
200202   DECLARE_WRITE_LINE_MEMBER( tape_read_w );
201203
r20728r20729
206208   DECLARE_READ8_MEMBER( ext_cia_pb_r );
207209   DECLARE_WRITE8_MEMBER( ext_cia_pb_w );
208210
209   IRQ_CALLBACK_MEMBER(pic_irq_callback);
211   DECLARE_WRITE_LINE_MEMBER( user_irq_w );
210212
213   IRQ_CALLBACK_MEMBER( pic_irq_callback );
214
211215   // memory state
212216   int m_dramon;
213217   int m_busen1;
r20728r20729
301305   DECLARE_READ8_MEMBER( tpi2_pc_r );
302306   DECLARE_WRITE8_MEMBER( tpi2_pc_w );
303307
308   DECLARE_WRITE_LINE_MEMBER( user_irq_w );
309
304310   // video state
305311   int m_statvid;
306312   int m_vicdotsel;
trunk/src/mess/mess.lst
r20728r20729
643643bx256hp   // Commodore BX256HP
644644cbm710  // Commodore CBM 710
645645cbm720  // Commodore CBM 720
646cbm720_de
646647cbm720_se  // Commodore CBM 720 (Sweden / Finland)
647648cbm730
648649p500      // Commodore P500 (proto, a.k.a. C128-40, PET-II)
trunk/src/mess/drivers/c64.c
r20728r20729
11891189   MCFG_SOUND_ADD(MOS6581_TAG, SID6581, VIC6567_CLOCK)
11901190   MCFG_SOUND_CONFIG(sid_intf)
11911191   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
1192   MCFG_SOUND_ADD("dac", DAC, 0)
1193   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
11941192
11951193   // devices
11961194   MCFG_PLS100_ADD(PLA_TAG)
11971195   MCFG_MOS6526_ADD(MOS6526_1_TAG, VIC6567_CLOCK, 60, cia1_intf)
11981196   MCFG_MOS6526_ADD(MOS6526_2_TAG, VIC6567_CLOCK, 60, cia2_intf)
1199   MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
12001197   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
12011198   MCFG_CBM_IEC_ADD(iec_intf, "c1541")
12021199   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
12031200   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy", NULL)
12041201   MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, VIC6567_CLOCK, expansion_intf, c64_expansion_cards, NULL, NULL)
12051202   MCFG_C64_USER_PORT_ADD(C64_USER_PORT_TAG, user_intf, c64_user_port_cards, NULL, NULL)
1203   MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
12061204
12071205   // software list
12081206   MCFG_SOFTWARE_LIST_ADD("cart_list_vic10", "vic10")
1209   MCFG_SOFTWARE_LIST_FILTER("cart_list_vic10", "NTSC")
12101207   MCFG_SOFTWARE_LIST_ADD("cart_list_c64", "c64_cart")
1208   MCFG_SOFTWARE_LIST_ADD("cass_list", "c64_cass")
1209   MCFG_SOFTWARE_LIST_ADD("flop_list", "c64_flop")
1210   MCFG_SOFTWARE_LIST_FILTER("cart_list_vic10", "NTSC")
12111211   MCFG_SOFTWARE_LIST_FILTER("cart_list_c64", "NTSC")
1212   MCFG_SOFTWARE_LIST_ADD("disk_list", "c64_flop")
1213   MCFG_SOFTWARE_LIST_FILTER("disk_list", "NTSC")
1212   MCFG_SOFTWARE_LIST_FILTER("cass_list", "NTSC")
1213   MCFG_SOFTWARE_LIST_FILTER("flop_list", "NTSC")
12141214
12151215   // internal ram
12161216   MCFG_RAM_ADD(RAM_TAG)
r20728r20729
12541254
12551255   // devices
12561256   MCFG_DEVICE_REMOVE("iec9")
1257   MCFG_CBM_IEC_SLOT_ADD("iec9", 8, sx1541_iec_devices, "sx1541", NULL)
1257   MCFG_CBM_IEC_SLOT_ADD("iec9", 9, sx1541_iec_devices, "sx1541", NULL)
12581258MACHINE_CONFIG_END
12591259
12601260
r20728r20729
12891289   MCFG_SOUND_ADD(MOS6581_TAG, SID6581, VIC6569_CLOCK)
12901290   MCFG_SOUND_CONFIG(sid_intf)
12911291   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
1292   MCFG_SOUND_ADD("dac", DAC, 0)
1293   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
12941292
12951293   // devices
12961294   MCFG_PLS100_ADD(PLA_TAG)
12971295   MCFG_MOS6526_ADD(MOS6526_1_TAG, VIC6569_CLOCK, 50, cia1_intf)
12981296   MCFG_MOS6526_ADD(MOS6526_2_TAG, VIC6569_CLOCK, 50, cia2_intf)
1299   MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
13001297   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
13011298   MCFG_CBM_IEC_ADD(iec_intf, "c1541")
13021299   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
13031300   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy", NULL)
13041301   MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, VIC6569_CLOCK, expansion_intf, c64_expansion_cards, NULL, NULL)
13051302   MCFG_C64_USER_PORT_ADD(C64_USER_PORT_TAG, user_intf, c64_user_port_cards, NULL, NULL)
1303   MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
13061304
13071305   // software list
13081306   MCFG_SOFTWARE_LIST_ADD("cart_list_vic10", "vic10")
1309   MCFG_SOFTWARE_LIST_FILTER("cart_list_vic10", "PAL")
13101307   MCFG_SOFTWARE_LIST_ADD("cart_list_c64", "c64_cart")
1308   MCFG_SOFTWARE_LIST_ADD("cass_list", "c64_cass")
1309   MCFG_SOFTWARE_LIST_ADD("flop_list", "c64_flop")
1310   MCFG_SOFTWARE_LIST_FILTER("cart_list_vic10", "PAL")
13111311   MCFG_SOFTWARE_LIST_FILTER("cart_list_c64", "PAL")
1312   MCFG_SOFTWARE_LIST_ADD("disk_list", "c64_flop")
1313   MCFG_SOFTWARE_LIST_FILTER("disk_list", "PAL")
1312   MCFG_SOFTWARE_LIST_FILTER("cass_list", "PAL")
1313   MCFG_SOFTWARE_LIST_FILTER("flop_list", "PAL")
13141314
13151315   // internal ram
13161316   MCFG_RAM_ADD(RAM_TAG)
r20728r20729
13671367   MCFG_SOUND_ADD(MOS6581_TAG, SID8580, VIC6569_CLOCK)
13681368   MCFG_SOUND_CONFIG(sid_intf)
13691369   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
1370   MCFG_SOUND_ADD("dac", DAC, 0)
1371   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
13721370
13731371   // devices
13741372   MCFG_PLS100_ADD(PLA_TAG)
r20728r20729
13791377   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy", NULL)
13801378   MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, VIC6569_CLOCK, expansion_intf, c64_expansion_cards, NULL, NULL)
13811379   MCFG_C64_USER_PORT_ADD(C64_USER_PORT_TAG, user_intf, c64_user_port_cards, NULL, NULL)
1380   MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
13821381
13831382   // software list
13841383   MCFG_SOFTWARE_LIST_ADD("cart_list_vic10", "vic10")
1385   MCFG_SOFTWARE_LIST_FILTER("cart_list_vic10", "PAL")
13861384   MCFG_SOFTWARE_LIST_ADD("cart_list_c64", "c64_cart")
1385   MCFG_SOFTWARE_LIST_FILTER("cart_list_vic10", "PAL")
13871386   MCFG_SOFTWARE_LIST_FILTER("cart_list_c64", "PAL")
13881387
13891388   // internal ram
trunk/src/mess/drivers/pet2001.c
r20728r20729
141141      - PLA dumps
142142      - high resolution graphics
143143      - rom software list
144   - user port
145   - memory expansion port
146144
147145*/
148146
r20728r20729
158156//  check_interrupts -
159157//-------------------------------------------------
160158
161void pet2001_state::check_interrupts()
159void pet_state::check_interrupts()
162160{
163161   int irq = m_via_irq || m_pia1a_irq || m_pia1b_irq || m_pia2a_irq || m_pia2b_irq || m_exp_irq;
164162
r20728r20729
170168//  update_speaker -
171169//-------------------------------------------------
172170
173void pet2001_state::update_speaker()
171void pet_state::update_speaker()
174172{
175173   if (m_speaker)
176174   {
r20728r20729
183181//  read -
184182//-------------------------------------------------
185183
186READ8_MEMBER( pet2001_state::read )
184READ8_MEMBER( pet_state::read )
187185{
186   int sel = offset >> 12;
187   int norom = m_exp->norom_r(space, offset, sel);
188188   UINT8 data = 0;
189189
190   switch (offset >> 12)
190   switch (sel)
191191   {
192192   case SEL0: case SEL1: case SEL2: case SEL3:   case SEL4: case SEL5: case SEL6: case SEL7:
193193      if (offset < m_ram->size())
r20728r20729
201201      break;
202202
203203   case SEL9: case SELA: case SELB: case SELC: case SELD: case SELF:
204      data = m_rom->base()[offset - 0x9000];
204      if (norom)
205      {
206         data = m_rom->base()[offset - 0x9000];
207      }
205208      break;
206209
207210   case SELE:
r20728r20729
224227            data = m_crtc->register_r(space, 0);
225228         }
226229      }
227      else
230      else if (norom)
228231      {
229232         data = m_rom->base()[offset - 0x9000];
230233      }
231234      break;
232235   }
233236
234   return data;
237   return m_exp->read(space, offset, data, sel);
235238}
236239
237240
r20728r20729
239242//  write -
240243//-------------------------------------------------
241244
242WRITE8_MEMBER( pet2001_state::write )
245WRITE8_MEMBER( pet_state::write )
243246{
244   switch (offset >> 12)
247   int sel = offset >> 12;
248
249   switch (sel)
245250   {
246251   case SEL0: case SEL1: case SEL2: case SEL3:   case SEL4: case SEL5: case SEL6: case SEL7:
247252      if (offset < m_ram->size())
r20728r20729
283288      }
284289      break;
285290   }
291
292   m_exp->write(space, offset, data, sel);
286293}
287294
288295
r20728r20729
295302//  ADDRESS_MAP( pet2001_mem )
296303//-------------------------------------------------
297304
298static ADDRESS_MAP_START( pet2001_mem, AS_PROGRAM, 8, pet2001_state )
305static ADDRESS_MAP_START( pet2001_mem, AS_PROGRAM, 8, pet_state )
299306   AM_RANGE(0x0000, 0xffff) AM_READWRITE(read, write)
300307ADDRESS_MAP_END
301308
r20728r20729
554561//  via6522_interface via_intf
555562//-------------------------------------------------
556563
557WRITE_LINE_MEMBER( pet2001_state::via_irq_w )
564WRITE_LINE_MEMBER( pet_state::via_irq_w )
558565{
559566   m_via_irq = state;
560567
561568   check_interrupts();
562569}
563570
564READ8_MEMBER( pet2001_state::via_pb_r )
571READ8_MEMBER( pet_state::via_pb_r )
565572{
566573   /*
567574
r20728r20729
591598   return data;
592599}
593600
594WRITE8_MEMBER( pet2001_state::via_pb_w )
601WRITE8_MEMBER( pet_state::via_pb_w )
595602{
596603   /*
597604
r20728r20729
618625   m_cassette2->motor_w(BIT(data, 4));
619626}
620627
621WRITE_LINE_MEMBER( pet2001_state::via_ca2_w )
628WRITE_LINE_MEMBER( pet_state::via_ca2_w )
622629{
623630   m_graphic = state;
624631}
625632
626WRITE_LINE_MEMBER( pet2001_state::via_cb2_w )
633WRITE_LINE_MEMBER( pet_state::via_cb2_w )
627634{
628635   m_via_cb2 = state;
629636   update_speaker();
630637
631   //m_user->cb2_w(state);
638   m_user->cb2_w(state);
632639}
633640
634641const via6522_interface via_intf =
635642{
636   DEVCB_NULL,//DEVCB_DEVICE_MEMBER(PET_USER_PORT_TAG, pet_user_port_device, pa_r),
637   DEVCB_DRIVER_MEMBER(pet2001_state, via_pb_r),
643   DEVCB_DEVICE_MEMBER(PET_USER_PORT_TAG, pet_user_port_device, pa_r),
644   DEVCB_DRIVER_MEMBER(pet_state, via_pb_r),
638645   DEVCB_NULL,
639646   DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT2_TAG, pet_datassette_port_device, read),
640647   DEVCB_NULL,
641648   DEVCB_NULL,
642   DEVCB_NULL,//DEVCB_DEVICE_MEMBER(PET_USER_PORT_TAG, pet_user_port_device, pa_w),
643   DEVCB_DRIVER_MEMBER(pet2001_state, via_pb_w),
644   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(PET_USER_PORT_TAG, pet_user_port_device, ca1_w),
645   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, via_ca2_w),
649   DEVCB_DEVICE_MEMBER(PET_USER_PORT_TAG, pet_user_port_device, pa_w),
650   DEVCB_DRIVER_MEMBER(pet_state, via_pb_w),
651   DEVCB_DEVICE_LINE_MEMBER(PET_USER_PORT_TAG, pet_user_port_device, ca1_w),
652   DEVCB_DRIVER_LINE_MEMBER(pet_state, via_ca2_w),
646653   DEVCB_NULL,
647   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, via_cb2_w),
648   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, via_irq_w)
654   DEVCB_DRIVER_LINE_MEMBER(pet_state, via_cb2_w),
655   DEVCB_DRIVER_LINE_MEMBER(pet_state, via_irq_w)
649656};
650657
651658
r20728r20729
653660//  pia6821_interface pia1_intf
654661//-------------------------------------------------
655662
656WRITE_LINE_MEMBER( pet2001_state::pia1_irqa_w )
663WRITE_LINE_MEMBER( pet_state::pia1_irqa_w )
657664{
658665   m_pia1a_irq = state;
659666
660667   check_interrupts();
661668}
662669
663WRITE_LINE_MEMBER( pet2001_state::pia1_irqb_w )
670WRITE_LINE_MEMBER( pet_state::pia1_irqb_w )
664671{
665672   m_pia1b_irq = state;
666673
667674   check_interrupts();
668675}
669676
670READ8_MEMBER( pet2001_state::pia1_pa_r )
677READ8_MEMBER( pet_state::pia1_pa_r )
671678{
672679   /*
673680
r20728r20729
702709   return data;
703710}
704711
705WRITE8_MEMBER( pet2001_state::pia1_pa_w )
712WRITE8_MEMBER( pet_state::pia1_pa_w )
706713{
707714   /*
708715
r20728r20729
727734   update_speaker();
728735}
729736
730READ8_MEMBER( pet2001_state::pia1_pb_r )
737READ8_MEMBER( pet_state::pia1_pb_r )
731738{
732739   UINT8 data = 0xff;
733740
r20728r20729
769776   return data;
770777}
771778
772READ_LINE_MEMBER( pet2001_state::pia1_cb1_r )
779READ_LINE_MEMBER( pet_state::pia1_cb1_r )
773780{
774781   return (m_crtc ? m_crtc->vsync_r() : m_sync);
775782}
776783
777WRITE_LINE_MEMBER( pet2001_state::pia1_ca2_w )
784WRITE_LINE_MEMBER( pet_state::pia1_ca2_w )
778785{
779786   m_ieee->eoi_w(state);
780787
r20728r20729
783790
784791const pia6821_interface pia1_intf =
785792{
786   DEVCB_DRIVER_MEMBER(pet2001_state, pia1_pa_r),
787   DEVCB_DRIVER_MEMBER(pet2001_state, pia1_pb_r),
793   DEVCB_DRIVER_MEMBER(pet_state, pia1_pa_r),
794   DEVCB_DRIVER_MEMBER(pet_state, pia1_pb_r),
788795   DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, read),
789   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_cb1_r),
796   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_cb1_r),
790797   DEVCB_NULL,
791798   DEVCB_NULL,
792   DEVCB_DRIVER_MEMBER(pet2001_state, pia1_pa_w),
799   DEVCB_DRIVER_MEMBER(pet_state, pia1_pa_w),
793800   DEVCB_NULL,
794   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_ca2_w),
801   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_ca2_w),
795802   DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, motor_w),
796   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_irqa_w),
797   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_irqb_w)
803   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_irqa_w),
804   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_irqb_w)
798805};
799806
800807const pia6821_interface pet2001b_pia1_intf =
801808{
802   DEVCB_DRIVER_MEMBER(pet2001_state, pia1_pa_r),
809   DEVCB_DRIVER_MEMBER(pet_state, pia1_pa_r),
803810   DEVCB_DRIVER_MEMBER(pet2001b_state, pia1_pb_r),
804811   DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, read),
805   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_cb1_r),
812   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_cb1_r),
806813   DEVCB_NULL,
807814   DEVCB_NULL,
808   DEVCB_DRIVER_MEMBER(pet2001_state, pia1_pa_w),
815   DEVCB_DRIVER_MEMBER(pet_state, pia1_pa_w),
809816   DEVCB_NULL,
810   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_ca2_w),
817   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_ca2_w),
811818   DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, motor_w),
812   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_irqa_w),
813   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia1_irqb_w)
819   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_irqa_w),
820   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia1_irqb_w)
814821};
815822
816823
r20728r20729
818825//  pia6821_interface pia2_intf
819826//-------------------------------------------------
820827
821WRITE_LINE_MEMBER( pet2001_state::pia2_irqa_w )
828WRITE_LINE_MEMBER( pet_state::pia2_irqa_w )
822829{
823830   m_pia2a_irq = state;
824831
825832   check_interrupts();
826833}
827834
828WRITE_LINE_MEMBER( pet2001_state::pia2_irqb_w )
835WRITE_LINE_MEMBER( pet_state::pia2_irqb_w )
829836{
830837   m_pia2b_irq = state;
831838
r20728r20729
844851   DEVCB_DEVICE_MEMBER(IEEE488_TAG, ieee488_device, dio_w),
845852   DEVCB_DEVICE_LINE_MEMBER(IEEE488_TAG, ieee488_device, ndac_w),
846853   DEVCB_DEVICE_LINE_MEMBER(IEEE488_TAG, ieee488_device, dav_w),
847   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia2_irqa_w),
848   DEVCB_DRIVER_LINE_MEMBER(pet2001_state, pia2_irqb_w)
854   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia2_irqa_w),
855   DEVCB_DRIVER_LINE_MEMBER(pet_state, pia2_irqb_w)
849856};
850857
851858
r20728r20729
886893};
887894
888895
896//-------------------------------------------------
897//  PET_USER_PORT_INTERFACE( user_intf )
898//-------------------------------------------------
889899
900static PET_USER_PORT_INTERFACE( user_intf )
901{
902   DEVCB_DEVICE_LINE_MEMBER(M6522_TAG, via6522_device, write_ca1),
903   DEVCB_DEVICE_LINE_MEMBER(M6522_TAG, via6522_device, write_cb2)
904};
905
906
907
890908//**************************************************************************
891909//  VIDEO
892910//**************************************************************************
r20728r20729
895913//  TIMER_DEVICE_CALLBACK( sync_tick )
896914//-------------------------------------------------
897915
898TIMER_DEVICE_CALLBACK_MEMBER( pet2001_state::sync_tick )
916TIMER_DEVICE_CALLBACK_MEMBER( pet_state::sync_tick )
899917{
900918   m_sync = !m_sync;
901919
r20728r20729
907925//  SCREEN_UPDATE( pet2001 )
908926//-------------------------------------------------
909927
910UINT32 pet2001_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
928UINT32 pet_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
911929{
912930   for (int y = 0; y < 200; y++)
913931   {
r20728r20729
10041022//  MACHINE_START( pet )
10051023//-------------------------------------------------
10061024
1007MACHINE_START_MEMBER( pet2001_state, pet )
1025MACHINE_START_MEMBER( pet_state, pet )
10081026{
10091027   // allocate memory
10101028   m_video_ram.allocate(m_video_ram_size);
r20728r20729
10441062//  MACHINE_START( pet2001 )
10451063//-------------------------------------------------
10461064
1047MACHINE_START_MEMBER( pet2001_state, pet2001 )
1065MACHINE_START_MEMBER( pet_state, pet2001 )
10481066{
10491067   m_video_ram_size = 0x400;
10501068
r20728r20729
10561074//  MACHINE_RESET( pet )
10571075//-------------------------------------------------
10581076
1059MACHINE_RESET_MEMBER( pet2001_state, pet )
1077MACHINE_RESET_MEMBER( pet_state, pet )
10601078{
10611079   m_maincpu->reset();
10621080
r20728r20729
10641082   m_pia1->reset();
10651083   m_pia2->reset();
10661084
1067   //m_exp->reset();
1085   m_exp->reset();
10681086}
10691087
10701088
r20728r20729
11441162//  MACHINE_CONFIG( pet )
11451163//-------------------------------------------------
11461164
1147static MACHINE_CONFIG_START( pet, pet2001_state )
1148   MCFG_MACHINE_START_OVERRIDE(pet2001_state, pet2001)
1149   MCFG_MACHINE_RESET_OVERRIDE(pet2001_state, pet)
1165static MACHINE_CONFIG_START( pet, pet_state )
1166   MCFG_MACHINE_START_OVERRIDE(pet_state, pet2001)
1167   MCFG_MACHINE_RESET_OVERRIDE(pet_state, pet)
11501168
11511169   // basic machine hardware
11521170   MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_8MHz/8)
r20728r20729
11581176   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
11591177   MCFG_SCREEN_SIZE(320, 200)
11601178   MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 200-1)
1161   MCFG_SCREEN_UPDATE_DRIVER(pet2001_state, screen_update)
1162   MCFG_TIMER_DRIVER_ADD_PERIODIC("sync_timer", pet2001_state, sync_tick, attotime::from_hz(120))
1179   MCFG_SCREEN_UPDATE_DRIVER(pet_state, screen_update)
1180   MCFG_TIMER_DRIVER_ADD_PERIODIC("sync_timer", pet_state, sync_tick, attotime::from_hz(120))
11631181
11641182   // devices
11651183   MCFG_VIA6522_ADD(M6522_TAG, XTAL_8MHz/8, via_intf)
11661184   MCFG_PIA6821_ADD(M6520_1_TAG, pia1_intf)
11671185   MCFG_PIA6821_ADD(M6520_2_TAG, pia2_intf)
11681186   MCFG_CBM_IEEE488_ADD(ieee488_intf, "c4040")
1169   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
1187   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c2n", NULL)
11701188   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, datassette2_intf, cbm_datassette_devices, NULL, NULL)
1171   //MCFG_QUICKLOAD_ADD("quickload", cbm_pet, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
1172   //MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_8MHz/8, pet_expansion_cards, NULL, NULL)
1173   //MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, user_intf, pet_user_port_cards, NULL, NULL)
1189   MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_8MHz/8, pet_expansion_cards, NULL, NULL)
1190   MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, user_intf, pet_user_port_cards, NULL, NULL)
1191   MCFG_QUICKLOAD_ADD("quickload", cbm_pet, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
11741192
11751193   // software lists
1194   MCFG_SOFTWARE_LIST_ADD("cass_list", "pet_cass")
11761195   MCFG_SOFTWARE_LIST_ADD("flop_list", "pet_flop")
11771196MACHINE_CONFIG_END
11781197
r20728r20729
14411460   MCFG_PIA6821_ADD(M6520_1_TAG, pia1_intf)
14421461   MCFG_PIA6821_ADD(M6520_2_TAG, pia2_intf)
14431462   MCFG_CBM_IEEE488_ADD(ieee488_intf, "c8050")
1444   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
1463   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c2n", NULL)
14451464   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, datassette2_intf, cbm_datassette_devices, NULL, NULL)
14461465   //MCFG_QUICKLOAD_ADD("quickload", cbm_pet, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
1447   //MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_16MHz/16, pet_expansion_cards, NULL, NULL)
1448   //MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, user_intf, pet_user_port_cards, NULL, NULL)
1466   MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_16MHz/16, pet_expansion_cards, NULL, NULL)
1467   MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, user_intf, pet_user_port_cards, NULL, NULL)
14491468
14501469   // software lists
1470   MCFG_SOFTWARE_LIST_ADD("cass_list", "pet_cass")
14511471   MCFG_SOFTWARE_LIST_ADD("flop_list", "pet_flop")
14521472MACHINE_CONFIG_END
14531473
trunk/src/mess/drivers/cbm2.c
r20728r20729
44
55    - 8088 board
66    - CIA timers fail in burn-in test
7    - shift lock
8    - Hungarian keyboard
97    - cbm620hu charom banking?
10    - DIN roms 324866-03a / 324867-02
11    - user port
128
139*/
1410
r20728r20729
10411037
10421038
10431039//-------------------------------------------------
1044//  INPUT_PORTS( cbm2hu )
1040//  INPUT_PORTS( cbm2_de )
10451041//-------------------------------------------------
10461042
1047static INPUT_PORTS_START( cbm2hu )
1043static INPUT_PORTS_START( cbm2_de )
10481044   PORT_INCLUDE(cbm2)
10491045INPUT_PORTS_END
10501046
10511047
10521048//-------------------------------------------------
1053//  INPUT_PORTS( cbm2sw )
1049//  INPUT_PORTS( cbm2_hu )
10541050//-------------------------------------------------
10551051
1056static INPUT_PORTS_START( cbm2sw )
1052static INPUT_PORTS_START( cbm2_hu )
10571053   PORT_INCLUDE(cbm2)
1054INPUT_PORTS_END
10581055
1056
1057//-------------------------------------------------
1058//  INPUT_PORTS( cbm2_se )
1059//------------------------------------------------
1060
1061static INPUT_PORTS_START( cbm2_se )
1062   PORT_INCLUDE(cbm2)
1063
10591064   PORT_MODIFY("PA0")
10601065   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0x00F6) PORT_CHAR(0x00D6)
10611066
r20728r20729
11531158   {
11541159   case 1: data = m_joy1->pot_x_r(); break;
11551160   case 2: data = m_joy2->pot_x_r(); break;
1156   case 3: break; // TODO pot1 and pot2 in series
1161   case 3:
1162      if (m_joy1->has_pot_x() && m_joy2->has_pot_x())
1163      {
1164         data = 1 / (1 / m_joy1->pot_x_r() + 1 / m_joy2->pot_x_r());
1165      }
1166      else if (m_joy1->has_pot_x())
1167      {
1168         data = m_joy1->pot_x_r();
1169      }
1170      else if (m_joy2->has_pot_x())
1171      {
1172         data = m_joy2->pot_x_r();
1173      }
1174      break;
11571175   }
11581176
11591177   return data;
r20728r20729
11671185   {
11681186   case 1: data = m_joy1->pot_y_r(); break;
11691187   case 2: data = m_joy2->pot_y_r(); break;
1170   case 3: break; // TODO pot1 and pot2 in series
1188   case 3:
1189      if (m_joy1->has_pot_y() && m_joy2->has_pot_y())
1190      {
1191         data = 1 / (1 / m_joy1->pot_y_r() + 1 / m_joy2->pot_y_r());
1192      }
1193      else if (m_joy1->has_pot_y())
1194      {
1195         data = m_joy1->pot_y_r();
1196      }
1197      else if (m_joy2->has_pot_y())
1198      {
1199         data = m_joy2->pot_y_r();
1200      }
1201      break;
11711202   }
11721203
11731204   return data;
r20728r20729
12831314   data |= m_ieee2->srq_r() << 1;
12841315
12851316   // user port
1286   //data |= m_user->pb2_r() << 2;
1287   //data |= m_user->pb3_r() << 3;
1317   data |= m_user->pb2_r() << 2;
1318   data |= m_user->pb3_r() << 3;
12881319
12891320   // cassette
12901321   data |= m_cassette->sense_r() << 7;
r20728r20729
13141345   m_ieee2->srq_w(BIT(data, 1));
13151346
13161347   // user port
1317   //m_user->pb2_w(BIT(data, 2));
1318   //m_user->pb3_w(BIT(data, 3));
1348   m_user->pb2_w(BIT(data, 2));
1349   m_user->pb3_w(BIT(data, 3));
13191350
13201351   // memory
13211352   m_dramon = BIT(data, 4);
r20728r20729
15531584   data |= m_ieee1->read(space, 0);
15541585
15551586   // user port
1556   //data |= m_user->data1_r();
1587   data |= m_user->d1_r(space, 0);
15571588
15581589   // joystick
1559   //data |= BIT(m_joy1->joy_r(), 5) << 6;
1560   //data |= BIT(m_joy2->joy_r(), 5) << 7;
1590   data &= ~(!BIT(m_joy1->joy_r(), 5) << 6);
1591   data &= ~(!BIT(m_joy2->joy_r(), 5) << 7);
15611592
15621593   return data;
15631594}
r20728r20729
15831614   m_ieee1->write(space, 0, data);
15841615
15851616   // user port
1586   //m_user->data1_w(data);
1617   m_user->d1_w(space, 0, data);
15871618
15881619   // joystick
15891620   m_cia_pa = data;
r20728r20729
16131644   data |= (m_joy2->joy_r() & 0x0f) << 4;
16141645
16151646   // user port
1616   //data &= m_user->data2_r();
1647   data &= m_user->d2_r(space, 0);
16171648
16181649   return data;
16191650}
16201651
1621WRITE8_MEMBER( cbm2_state::cia_pb_w )
1622{
1623   /*
1624
1625       bit     description
1626
1627       0       user port 2D0
1628       1       user port 2D1
1629       2       user port 2D2
1630       3       user port 2D3
1631       4       user port 2D4
1632       5       user port 2D5
1633       6       user port 2D6
1634       7       user port 2D7
1635
1636   */
1637
1638   //m_user->data2_w(data);
1639}
1640
16411652static MOS6526_INTERFACE( cia_intf )
16421653{
16431654   DEVCB_DEVICE_LINE_MEMBER(MOS6525_1_TAG, tpi6525_device, i2_w),
1644   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(CBM2_USER_PORT_TAG, cbm2_user_port_device, pc_w),
1645   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(CBM2_USER_PORT_TAG, cbm2_user_port_device, sp_w),
1646   DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER(CBM2_USER_PORT_TAG, cbm2_user_port_device, cnt_w),
1655   DEVCB_DEVICE_LINE_MEMBER(CBM2_USER_PORT_TAG, cbm2_user_port_device, pc_w),
1656   DEVCB_DEVICE_LINE_MEMBER(CBM2_USER_PORT_TAG, cbm2_user_port_device, sp_w),
1657   DEVCB_DEVICE_LINE_MEMBER(CBM2_USER_PORT_TAG, cbm2_user_port_device, cnt_w),
16471658   DEVCB_DRIVER_MEMBER(cbm2_state, cia_pa_r),
16481659   DEVCB_DRIVER_MEMBER(cbm2_state, cia_pa_w),
16491660   DEVCB_DRIVER_MEMBER(cbm2_state, cia_pb_r),
1650   DEVCB_DRIVER_MEMBER(cbm2_state, cia_pb_w),
1661   DEVCB_DEVICE_MEMBER(CBM2_USER_PORT_TAG, cbm2_user_port_device, d2_w)
16511662};
16521663
16531664
r20728r20729
19181929};
19191930
19201931
1932//-------------------------------------------------
1933//  CBM2_USER_PORT_INTERFACE( user_intf )
1934//-------------------------------------------------
19211935
1936WRITE_LINE_MEMBER( cbm2_state::user_irq_w )
1937{
1938   m_user_irq = state;
1939
1940   m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_tpi1_irq || m_user_irq);
1941}
1942
1943static CBM2_USER_PORT_INTERFACE( user_intf )
1944{
1945   DEVCB_DRIVER_LINE_MEMBER(cbm2_state, user_irq_w),
1946   DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, sp_w),
1947   DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, cnt_w),
1948   DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, flag_w)
1949};
1950
1951
1952//-------------------------------------------------
1953//  CBM2_USER_PORT_INTERFACE( p500_user_intf )
1954//-------------------------------------------------
1955
1956WRITE_LINE_MEMBER( p500_state::user_irq_w )
1957{
1958   m_user_irq = state;
1959
1960   m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_vic_irq || m_tpi1_irq || m_user_irq);
1961}
1962
1963static CBM2_USER_PORT_INTERFACE( p500_user_intf )
1964{
1965   DEVCB_DRIVER_LINE_MEMBER(p500_state, user_irq_w),
1966   DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, sp_w),
1967   DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, cnt_w),
1968   DEVCB_DEVICE_LINE_MEMBER(MOS6526_TAG, mos6526_device, flag_w)
1969};
1970
1971
1972
19221973//**************************************************************************
19231974//  MACHINE INITIALIZATION
19241975//**************************************************************************
r20728r20729
21572208   MCFG_SOUND_ADD(MOS6851_TAG, SID6581, VIC6567_CLOCK)
21582209   MCFG_SOUND_CONFIG(sid_intf)
21592210   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
2160   MCFG_SOUND_ADD("dac", DAC, 0)
2161   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
21622211
21632212   // devices
21642213   MCFG_PLS100_ADD(PLA1_TAG)
r20728r20729
21742223   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
21752224   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
21762225   MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, VIC6567_CLOCK, cbm2_expansion_cards, NULL, NULL)
2177   //MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, user_intf, cbm2_user_port_cards, NULL, NULL)
2226   MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, p500_user_intf, cbm2_user_port_cards, NULL, NULL)
2227   MCFG_QUICKLOAD_ADD("quickload", p500, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
21782228
21792229   // internal ram
21802230   MCFG_FRAGMENT_ADD(128k)
21812231
21822232   // software list
2233   MCFG_SOFTWARE_LIST_ADD("cart_list", "cbm2_cart")
21832234   MCFG_SOFTWARE_LIST_ADD("flop_list", "p500_flop")
2184   MCFG_SOFTWARE_LIST_ADD("cart_list", "cbm2_cart")
2235   MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
2236   MCFG_SOFTWARE_LIST_FILTER("flop_list", "NTSC")
21852237MACHINE_CONFIG_END
21862238
21872239
r20728r20729
22062258   MCFG_SOUND_ADD(MOS6851_TAG, SID6581, VIC6569_CLOCK)
22072259   MCFG_SOUND_CONFIG(sid_intf)
22082260   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
2209   MCFG_SOUND_ADD("dac", DAC, 0)
2210   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
22112261
22122262   // devices
22132263   MCFG_PLS100_ADD(PLA1_TAG)
r20728r20729
22232273   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
22242274   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
22252275   MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, VIC6569_CLOCK, cbm2_expansion_cards, NULL, NULL)
2226   //MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, user_intf, cbm2_user_port_cards, NULL, NULL)
2276   MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, p500_user_intf, cbm2_user_port_cards, NULL, NULL)
2277   MCFG_QUICKLOAD_ADD("quickload", p500, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
22272278
22282279   // internal ram
22292280   MCFG_FRAGMENT_ADD(128k)
22302281
22312282   // software list
2283   MCFG_SOFTWARE_LIST_ADD("cart_list", "cbm2_cart")
22322284   MCFG_SOFTWARE_LIST_ADD("flop_list", "p500_flop")
2233   MCFG_SOFTWARE_LIST_ADD("cart_list", "cbm2_cart")
2285   MCFG_SOFTWARE_LIST_FILTER("cart_list", "PAL")
2286   MCFG_SOFTWARE_LIST_FILTER("flop_list", "PAL")
22342287MACHINE_CONFIG_END
22352288
22362289
r20728r20729
22632316   MCFG_SOUND_ADD(MOS6851_TAG, SID6581, XTAL_18MHz/9)
22642317   MCFG_SOUND_CONFIG(sid_intf)
22652318   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
2266   MCFG_SOUND_ADD("dac", DAC, 0)
2267   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
22682319
22692320   // devices
22702321   MCFG_PLS100_ADD(PLA1_TAG)
r20728r20729
22792330   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
22802331   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL)
22812332   MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_18MHz/9, cbm2_expansion_cards, NULL, NULL)
2282   //MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, user_intf, cbm2_user_port_cards, NULL, NULL)
2333   MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, user_intf, cbm2_user_port_cards, NULL, NULL)
2334   MCFG_QUICKLOAD_ADD("quickload", cbmb, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
22832335
22842336   // software list
2337   MCFG_SOFTWARE_LIST_ADD("cart_list", "cbm2_cart")
22852338   MCFG_SOFTWARE_LIST_ADD("flop_list", "cbm2_flop")
2286   MCFG_SOFTWARE_LIST_ADD("cart_list", "cbm2_cart")
2339   MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
2340   MCFG_SOFTWARE_LIST_FILTER("flop_list", "NTSC")
22872341MACHINE_CONFIG_END
22882342
22892343
r20728r20729
25072561   ROM_LOAD( "901237-01.u25", 0x0000, 0x1000, CRC(1acf5098) SHA1(e63bf18da48e5a53c99ef127c1ae721333d1d102) )
25082562
25092563   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2510   ROM_LOAD( "906114-04.bin", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
2564   ROM_LOAD( "906114-04.u18", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
25112565ROM_END
25122566
25132567
r20728r20729
25332587   ROM_LOAD( "901237-01.u25", 0x0000, 0x1000, CRC(1acf5098) SHA1(e63bf18da48e5a53c99ef127c1ae721333d1d102) )
25342588
25352589   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2536   ROM_LOAD( "906114-04.bin", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
2590   ROM_LOAD( "906114-04.u18", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
25372591ROM_END
25382592
25392593
r20728r20729
25572611   ROM_LOAD( "901237-01.u25", 0x0000, 0x1000, CRC(1acf5098) SHA1(e63bf18da48e5a53c99ef127c1ae721333d1d102) )
25582612
25592613   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2560   ROM_LOAD( "906114-04.bin", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
2614   ROM_LOAD( "906114-04.u18", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
25612615ROM_END
25622616
25632617
r20728r20729
25842638   ROM_LOAD( "610.u60", 0x0000, 0x4000, CRC(8eed0d7e) SHA1(9d06c5c3c012204eaaef8b24b1801759b62bf57e) )
25852639
25862640   ROM_REGION( 0x2000, "kernal", 0 )
2587   ROM_LOAD( "kernhun.bin", 0x0000, 0x2000, CRC(0ea8ca4d) SHA1(9977c9f1136ee9c04963e0b50ae0c056efa5663f) )
2641   ROM_LOAD( "kernhun.u61", 0x0000, 0x2000, CRC(0ea8ca4d) SHA1(9977c9f1136ee9c04963e0b50ae0c056efa5663f) )
25882642
25892643   ROM_REGION( 0x2000, "charom", 0 )
2590   ROM_LOAD( "charhun.bin", 0x0000, 0x2000, CRC(1fb5e596) SHA1(3254e069f8691b30679b19a9505b6afdfedce6ac) )
2644   ROM_LOAD( "charhun.u25", 0x0000, 0x2000, CRC(1fb5e596) SHA1(3254e069f8691b30679b19a9505b6afdfedce6ac) )
25912645
25922646   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2593   ROM_LOAD( "906114-04.bin", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
2647   ROM_LOAD( "906114-04.u18", 0x00, 0xf5, CRC(ae3ec265) SHA1(334e0bc4b2c957ecb240c051d84372f7b47efba3) )
25942648ROM_END
25952649
25962650
r20728r20729
26162670   ROM_LOAD( "901232-01.u25", 0x0000, 0x1000, CRC(3a350bc3) SHA1(e7f3cbc8e282f79a00c3e95d75c8d725ee3c6287) )
26172671
26182672   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2619   ROM_LOAD( "906114-05.bin", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
2673   ROM_LOAD( "906114-05.u75", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
26202674ROM_END
26212675
26222676
r20728r20729
26402694   ROM_LOAD( "901232-01.u25", 0x0000, 0x1000, CRC(3a350bc3) SHA1(e7f3cbc8e282f79a00c3e95d75c8d725ee3c6287) )
26412695
26422696   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2643   ROM_LOAD( "906114-05.bin", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
2697   ROM_LOAD( "906114-05.u75", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
26442698ROM_END
26452699
26462700
r20728r20729
26672721   ROM_LOAD( "901232-01.u25", 0x0000, 0x1000, CRC(3a350bc3) SHA1(e7f3cbc8e282f79a00c3e95d75c8d725ee3c6287) )
26682722
26692723   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2670   ROM_LOAD( "906114-05.bin", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
2724   ROM_LOAD( "906114-05.u75", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
26712725ROM_END
26722726
26732727
r20728r20729
26932747
26942748
26952749//-------------------------------------------------
2750//  ROM( cbm720_de )
2751//-------------------------------------------------
2752
2753ROM_START( cbm720_de )
2754   ROM_REGION( 0x4000, "basic", 0 )
2755   ROM_LOAD( "901241-03.u59", 0x0000, 0x2000, CRC(5c1f3347) SHA1(2d46be2cd89594b718cdd0a86d51b6f628343f42) )
2756   ROM_LOAD( "901240-03.u60", 0x2000, 0x2000, CRC(72aa44e1) SHA1(0d7f77746290afba8d0abeb87c9caab9a3ad89ce) )
2757
2758   ROM_REGION( 0x2000, "kernal", 0 )
2759   ROM_LOAD( "324886-03a.u61", 0x0000, 0x2000, CRC(554b008d) SHA1(1483a46924308d86f4c7f9cb71c34851c510fcf4) )
2760
2761   ROM_REGION( 0x1000, "charom", 0 )
2762   ROM_LOAD( "324867-02.u25", 0x0000, 0x1000, NO_DUMP )
2763
2764   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2765   ROM_LOAD( "906114-05.u75", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
2766ROM_END
2767
2768
2769//-------------------------------------------------
26962770//  ROM( cbm720_se )
26972771//-------------------------------------------------
26982772
r20728r20729
27082782   ROM_LOAD( "901233-03.u25", 0x0000, 0x1000, CRC(09518b19) SHA1(2e28491e31e2c0a3b6db388055216140a637cd09) )
27092783
27102784   ROM_REGION( 0xf5, PLA1_TAG, 0 )
2711   ROM_LOAD( "906114-05.bin", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
2785   ROM_LOAD( "906114-05.u75", 0x00, 0xf5, CRC(ff6ba6b6) SHA1(45808c570eb2eda7091c51591b3dbd2db1ac646a) )
27122786ROM_END
27132787
27142788
r20728r20729
27172791//  SYSTEM DRIVERS
27182792//**************************************************************************
27192793
2720//    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT   INIT                        COMPANY                         FULLNAME                    FLAGS
2721COMP( 1983, p500,       0,      0,      p500_ntsc,  cbm2,   driver_device,      0,      "Commodore Business Machines",  "P500 (NTSC)",              GAME_SUPPORTS_SAVE )
2722COMP( 1983, p500p,      p500,   0,      p500_pal,   cbm2,   driver_device,      0,      "Commodore Business Machines",  "P500 (PAL)",               GAME_SUPPORTS_SAVE )
2723
2724COMP( 1983, b500,       p500,   0,      b128,       cbm2,   driver_device,      0,      "Commodore Business Machines",  "B500",                     GAME_SUPPORTS_SAVE )
2725COMP( 1983, b128,       p500,   0,      b128,       cbm2,   driver_device,      0,      "Commodore Business Machines",  "B128",                     GAME_SUPPORTS_SAVE )
2726COMP( 1983, b256,       p500,   0,      b256,       cbm2,   driver_device,      0,      "Commodore Business Machines",  "B256",                     GAME_SUPPORTS_SAVE )
2727COMP( 1983, cbm610,     p500,   0,      cbm610,     cbm2,   driver_device,      0,      "Commodore Business Machines",  "CBM 610",                  GAME_SUPPORTS_SAVE )
2728COMP( 1983, cbm620,     p500,   0,      cbm620,     cbm2,   driver_device,      0,      "Commodore Business Machines",  "CBM 620",                  GAME_SUPPORTS_SAVE )
2729COMP( 1983, cbm620_hu,  p500,   0,      cbm620,     cbm2hu, driver_device,      0,      "Commodore Business Machines",  "CBM 620 (Hungary)",        GAME_SUPPORTS_SAVE )
2730
2731COMP( 1983, b128hp,     p500,   0,      b128hp,     cbm2,   driver_device,      0,      "Commodore Business Machines",  "B128-80HP",                GAME_SUPPORTS_SAVE )
2732COMP( 1983, b256hp,     p500,   0,      b256hp,     cbm2,   driver_device,      0,      "Commodore Business Machines",  "B256-80HP",                GAME_SUPPORTS_SAVE )
2733COMP( 1983, bx256hp,    p500,   0,      bx256hp,    cbm2,   driver_device,      0,      "Commodore Business Machines",  "BX256-80HP",               GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing
2734COMP( 1983, cbm710,     p500,   0,      cbm710,     cbm2,   driver_device,      0,      "Commodore Business Machines",  "CBM 710",                  GAME_SUPPORTS_SAVE )
2735COMP( 1983, cbm720,     p500,   0,      cbm720,     cbm2,   driver_device,      0,      "Commodore Business Machines",  "CBM 720",                  GAME_SUPPORTS_SAVE )
2736COMP( 1983, cbm720_se,  p500,   0,      cbm720,     cbm2sw, driver_device,      0,      "Commodore Business Machines",  "CBM 720 (Sweden/Finland)", GAME_SUPPORTS_SAVE )
2737COMP( 1983, cbm730,     p500,   0,      cbm730,     cbm2,   driver_device,      0,      "Commodore Business Machines",  "CBM 730",                  GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing
2794//    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT      INIT                        COMPANY                         FULLNAME                    FLAGS
2795COMP( 1983, p500,       0,      0,      p500_ntsc,  cbm2,      driver_device,      0,      "Commodore Business Machines",  "P500 (NTSC)",              GAME_SUPPORTS_SAVE )
2796COMP( 1983, p500p,      p500,   0,      p500_pal,   cbm2,      driver_device,      0,      "Commodore Business Machines",  "P500 (PAL)",               GAME_SUPPORTS_SAVE )
2797COMP( 1983, b500,       0,      0,      b128,       cbm2,      driver_device,      0,      "Commodore Business Machines",  "B500",                     GAME_SUPPORTS_SAVE )
2798COMP( 1983, b128,       b500,   0,      b128,       cbm2,      driver_device,      0,      "Commodore Business Machines",  "B128",                     GAME_SUPPORTS_SAVE )
2799COMP( 1983, b256,       b500,   0,      b256,       cbm2,      driver_device,      0,      "Commodore Business Machines",  "B256",                     GAME_SUPPORTS_SAVE )
2800COMP( 1983, cbm610,     b500,   0,      cbm610,     cbm2,      driver_device,      0,      "Commodore Business Machines",  "CBM 610",                  GAME_SUPPORTS_SAVE )
2801COMP( 1983, cbm620,     b500,   0,      cbm620,     cbm2,      driver_device,      0,      "Commodore Business Machines",  "CBM 620",                  GAME_SUPPORTS_SAVE )
2802COMP( 1983, cbm620_hu,  b500,   0,      cbm620,     cbm2_hu,    driver_device,      0,      "Commodore Business Machines",  "CBM 620 (Hungary)",        GAME_SUPPORTS_SAVE )
2803COMP( 1983, b128hp,     0,      0,      b128hp,     cbm2,      driver_device,      0,      "Commodore Business Machines",  "B128-80HP",                GAME_SUPPORTS_SAVE )
2804COMP( 1983, b256hp,     b128hp, 0,      b256hp,     cbm2,      driver_device,      0,      "Commodore Business Machines",  "B256-80HP",                GAME_SUPPORTS_SAVE )
2805COMP( 1983, bx256hp,    b128hp, 0,      bx256hp,    cbm2,      driver_device,      0,      "Commodore Business Machines",  "BX256-80HP",               GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing
2806COMP( 1983, cbm710,     b128hp, 0,      cbm710,     cbm2,      driver_device,      0,      "Commodore Business Machines",  "CBM 710",                  GAME_SUPPORTS_SAVE )
2807COMP( 1983, cbm720,     b128hp, 0,      cbm720,     cbm2,      driver_device,      0,      "Commodore Business Machines",  "CBM 720",                  GAME_SUPPORTS_SAVE )
2808COMP( 1983, cbm720_de,  b128hp, 0,      cbm720,     cbm2_de,   driver_device,      0,      "Commodore Business Machines",  "CBM 720 (Germany)",       GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
2809COMP( 1983, cbm720_se,  b128hp, 0,      cbm720,     cbm2_se,   driver_device,      0,      "Commodore Business Machines",  "CBM 720 (Sweden/Finland)", GAME_SUPPORTS_SAVE )
2810COMP( 1983, cbm730,     b128hp, 0,      cbm730,     cbm2,      driver_device,      0,      "Commodore Business Machines",  "CBM 730",                  GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // 8088 co-processor is missing
trunk/src/mess/drivers/vic20.c
r20728r20729
822822   // devices
823823   MCFG_VIA6522_ADD(M6522_0_TAG, 0, via0_intf)
824824   MCFG_VIA6522_ADD(M6522_1_TAG, 0, via1_intf)
825
826   MCFG_QUICKLOAD_ADD("quickload", cbm_vc20, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
827
828825   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
829826   MCFG_CBM_IEC_ADD(cbm_iec_intf, "c1541")
830
831827   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, "joy", NULL)
832828   MCFG_VIC20_USER_PORT_ADD(VIC20_USER_PORT_TAG, user_intf, vic20_user_port_cards, NULL, NULL)
829   MCFG_QUICKLOAD_ADD("quickload", cbm_vc20, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
833830
834831   // software lists
835832   MCFG_SOFTWARE_LIST_ADD("cart_list", "vic1001_cart")
836   MCFG_SOFTWARE_LIST_ADD("disk_list", "vic1001_flop")
833   MCFG_SOFTWARE_LIST_ADD("cass_list", "vic1001_cass")
834   MCFG_SOFTWARE_LIST_ADD("flop_list", "vic1001_flop")
837835
838836   // internal ram
839837   MCFG_RAM_ADD(RAM_TAG)
r20728r20729
863861
864862   // software lists
865863   MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
866   MCFG_SOFTWARE_LIST_FILTER("disk_list", "NTSC")
864   MCFG_SOFTWARE_LIST_FILTER("cass_list", "NTSC")
865   MCFG_SOFTWARE_LIST_FILTER("flop_list", "NTSC")
867866MACHINE_CONFIG_END
868867
869868
r20728r20729
889888
890889   // software lists
891890   MCFG_SOFTWARE_LIST_FILTER("cart_list", "PAL")
892   MCFG_SOFTWARE_LIST_FILTER("disk_list", "PAL")
891   MCFG_SOFTWARE_LIST_FILTER("cass_list", "PAL")
892   MCFG_SOFTWARE_LIST_FILTER("flop_list", "PAL")
893893MACHINE_CONFIG_END
894894
895895
trunk/src/mess/drivers/plus4.c
r20728r20729
3232#define BA4 BIT(offset, 4)
3333
3434
35enum
36{
37   CS0_BASIC = 0,
38   CS0_FUNCTION_LO,
39   CS0_C1_LOW,
40   CS0_C2_LOW
41};
4235
43
44enum
45{
46   CS1_KERNAL = 0,
47   CS1_FUNCTION_HI,
48   CS1_C1_HIGH,
49   CS1_C2_HIGH
50};
51
52
53
5436//**************************************************************************
5537//  INTERRUPTS
5638//**************************************************************************
r20728r20729
837819   MCFG_CPU_PROGRAM_MAP(plus4_mem)
838820   MCFG_M7501_PORT_CALLBACKS(READ8(plus4_state, cpu_r), WRITE8(plus4_state, cpu_w))
839821   MCFG_M7501_PORT_PULLS(0x00, 0xc0)
840   MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, plus4_state,  c16_frame_interrupt)
841   MCFG_CPU_PERIODIC_INT_DRIVER(plus4_state, c16_raster_interrupt,  TED7360_HRETRACERATE)
822   MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, plus4_state, c16_frame_interrupt)
823   MCFG_CPU_PERIODIC_INT_DRIVER(plus4_state, c16_raster_interrupt, TED7360_HRETRACERATE)
842824   MCFG_QUANTUM_TIME(attotime::from_hz(60))
843825
844826   // video and sound hardware
r20728r20729
851833   MCFG_ACIA6551_ADD(MOS6551_TAG)
852834   MCFG_MOS6529_ADD(MOS6529_USER_TAG, spi_user_intf)
853835   MCFG_MOS6529_ADD(MOS6529_KB_TAG, spi_kb_intf)
854   MCFG_QUICKLOAD_ADD("quickload", cbm_c16, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
855836   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, plus4_datassette_devices, "c1531", NULL)
856837   MCFG_CBM_IEC_ADD(iec_intf, NULL)
857838   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL)
858839   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy", NULL)
859840   MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/16, expansion_intf, plus4_expansion_cards, "c1551", NULL)
860841   MCFG_PLUS4_USER_PORT_ADD(PLUS4_USER_PORT_TAG, plus4_user_port_cards, NULL, NULL)
842   MCFG_QUICKLOAD_ADD("quickload", cbm_c16, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
861843
862844   // internal ram
863845   MCFG_RAM_ADD(RAM_TAG)
r20728r20729
865847
866848   // software list
867849   MCFG_SOFTWARE_LIST_ADD("cart_list", "plus4_cart")
868   MCFG_SOFTWARE_LIST_ADD("disk_list", "plus4_flop")
850   MCFG_SOFTWARE_LIST_ADD("cass_list", "plus4_cass")
851   MCFG_SOFTWARE_LIST_ADD("flop_list", "plus4_flop")
852   MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
853   MCFG_SOFTWARE_LIST_FILTER("cass_list", "NTSC")
854   MCFG_SOFTWARE_LIST_FILTER("flop_list", "NTSC")
869855MACHINE_CONFIG_END
870856
871857
r20728r20729
879865   MCFG_CPU_PROGRAM_MAP(plus4_mem)
880866   MCFG_M7501_PORT_CALLBACKS(READ8(plus4_state, cpu_r), WRITE8(plus4_state, cpu_w))
881867   MCFG_M7501_PORT_PULLS(0x00, 0xc0)
882   MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, plus4_state,  c16_frame_interrupt)
883   MCFG_CPU_PERIODIC_INT_DRIVER(plus4_state, c16_raster_interrupt,  TED7360_HRETRACERATE)
868   MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, plus4_state, c16_frame_interrupt)
869   MCFG_CPU_PERIODIC_INT_DRIVER(plus4_state, c16_raster_interrupt, TED7360_HRETRACERATE)
884870   MCFG_QUANTUM_TIME(attotime::from_hz(60))
885871
886872   // video and sound hardware
r20728r20729
907893
908894   // software list
909895   MCFG_SOFTWARE_LIST_ADD("cart_list", "plus4_cart")
910   MCFG_SOFTWARE_LIST_ADD("disk_list", "plus4_flop")
896   MCFG_SOFTWARE_LIST_ADD("cass_list", "plus4_cass")
897   MCFG_SOFTWARE_LIST_ADD("flop_list", "plus4_flop")
898   MCFG_SOFTWARE_LIST_FILTER("cart_list", "PAL")
899   MCFG_SOFTWARE_LIST_FILTER("cass_list", "PAL")
900   MCFG_SOFTWARE_LIST_FILTER("flop_list", "PAL")
911901MACHINE_CONFIG_END
912902
913903
trunk/src/mess/mess.mak
r20728r20729
825825
826826$(MESSOBJ)/cbm.a:               \
827827   $(MESS_DRIVERS)/pet2001.o   \
828   $(MESS_MACHINE)/petcass.o   \
829   $(MESS_MACHINE)/petexp.o   \
830   $(MESS_MACHINE)/petuser.o   \
828831   $(MESS_DRIVERS)/c64.o       \
829832   $(MESS_MACHINE)/c64_legacy.o       \
830833   $(MESS_DRIVERS)/c64dtv.o    \
r20728r20729
917920   $(MESS_MACHINE)/cbm2_std.o  \
918921   $(MESS_MACHINE)/cbm2_24k.o  \
919922   $(MESS_MACHINE)/cbm2_graphic.o  \
923   $(MESS_MACHINE)/cbm2user.o   \
920924   $(MESS_DRIVERS)/c65.o       \
921925   $(MESS_MACHINE)/c65.o       \
922926   $(MESS_DRIVERS)/c128.o      \
r20728r20729
939943   $(MESS_MACHINE)/cbm.o       \
940944   $(MESS_MACHINE)/cbmipt.o    \
941945   $(MESS_MACHINE)/64h156.o    \
942   $(MESS_MACHINE)/petcass.o   \
943946   $(MESS_MACHINE)/mos8722.o   \
944947   $(MESS_MACHINE)/mos8726.o   \
945948   $(MESS_MACHINE)/c2n.o       \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team