Previous 199869 Revisions Next

r20746 Tuesday 5th February, 2013 at 15:09:27 UTC by Curt Coder
(MESS) superpet: WIP. (nw)
[src/mess]mess.lst mess.mak
[src/mess/drivers]cbm2.c pet2001.c
[src/mess/includes]pet2001.h
[src/mess/machine]cbmipt.c cbmipt.h mos6702.c* mos6702.h* petexp.c petexp.h superpet.c* superpet.h*

trunk/src/mess/machine/cbmipt.c
r20745r20746
10251025
10261026SLOT_INTERFACE_START( pet_expansion_cards )
10271027   //SLOT_INTERFACE("64k", PET_64K)
1028   SLOT_INTERFACE("superpet", SUPERPET)
10281029SLOT_INTERFACE_END
10291030
10301031SLOT_INTERFACE_START( pet_user_port_cards )
trunk/src/mess/machine/cbmipt.h
r20745r20746
8484#include "machine/plus4_std.h"
8585#include "machine/serialbox.h"
8686#include "machine/softbox.h"
87#include "machine/superpet.h"
8788#include "machine/vic1010.h"
8889#include "machine/vic1110.h"
8990#include "machine/vic1111.h"
trunk/src/mess/machine/superpet.c
r0r20746
1/**********************************************************************
2
3    Commodore SuperPET emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "superpet.h"
11
12
13
14//**************************************************************************
15//  MACROS/CONSTANTS
16//**************************************************************************
17
18#define M6809_TAG      "u4"
19#define M6551_TAG      "u23"
20#define MOS6702_TAG      "u2"
21
22
23
24//**************************************************************************
25//  DEVICE DEFINITIONS
26//**************************************************************************
27
28const device_type SUPERPET = &device_creator<superpet_device>;
29
30
31//-------------------------------------------------
32//  ROM( superpet )
33//-------------------------------------------------
34
35ROM_START( superpet )
36   ROM_REGION( 0x7000, M6809_TAG, 0 )
37   ROM_LOAD( "901898-01.u17", 0x1000, 0x1000, CRC(728a998b) SHA1(0414b3ab847c8977eb05c2fcc72efcf2f9d92871) )
38   ROM_LOAD( "901898-02.u18", 0x2000, 0x1000, CRC(6beb7c62) SHA1(df154939b934d0aeeb376813ec1ba0d43c2a3378) )
39   ROM_LOAD( "901898-03.u19", 0x3000, 0x1000, CRC(5db4983d) SHA1(6c5b0cce97068f8841112ba6d5cd8e568b562fa3) )
40   ROM_LOAD( "901898-04.u20", 0x4000, 0x1000, CRC(f55fc559) SHA1(b42a2050a319a1ffca7868a8d8d635fadd37ec37) )
41   ROM_LOAD( "901897-01.u21", 0x5000, 0x0800, CRC(b2cee903) SHA1(e8ce8347451a001214a5e71a13081b38b4be23bc) )
42   ROM_LOAD( "901898-05.u22", 0x6000, 0x1000, CRC(f42df0cb) SHA1(9b4a5134d20345171e7303445f87c4e0b9addc96) )
43ROM_END
44
45
46//-------------------------------------------------
47//  rom_region - device-specific ROM region
48//-------------------------------------------------
49
50const rom_entry *superpet_device::device_rom_region() const
51{
52   return ROM_NAME( superpet );
53}
54
55
56//-------------------------------------------------
57//  ADDRESS_MAP( superpet_mem )
58//-------------------------------------------------
59
60static ADDRESS_MAP_START( superpet_mem, AS_PROGRAM, 8, superpet_device )
61   AM_RANGE(0x0000, 0xffff) AM_READWRITE(read, write)
62ADDRESS_MAP_END
63
64
65//-------------------------------------------------
66//  MACHINE_CONFIG_FRAGMENT( superpet )
67//-------------------------------------------------
68
69static MACHINE_CONFIG_FRAGMENT( superpet )
70   MCFG_CPU_ADD(M6809_TAG, M6809, XTAL_16MHz/16)
71   MCFG_CPU_PROGRAM_MAP(superpet_mem)
72
73   MCFG_ACIA6551_ADD(M6551_TAG) // XTAL_1_8432MHz
74   MCFG_MOS6702_ADD(MOS6702_TAG, XTAL_16MHz/16)
75MACHINE_CONFIG_END
76
77
78//-------------------------------------------------
79//  machine_config_additions - device-specific
80//  machine configurations
81//-------------------------------------------------
82
83machine_config_constructor superpet_device::device_mconfig_additions() const
84{
85   return MACHINE_CONFIG_NAME( superpet );
86}
87
88
89//-------------------------------------------------
90//  INPUT_PORTS( superpet )
91//-------------------------------------------------
92
93static INPUT_PORTS_START( superpet )
94   PORT_START("SW1")
95   
96   PORT_START("SW2")
97INPUT_PORTS_END
98
99
100//-------------------------------------------------
101//  input_ports - device-specific input ports
102//-------------------------------------------------
103
104ioport_constructor superpet_device::device_input_ports() const
105{
106   return INPUT_PORTS_NAME( superpet );
107}
108
109
110
111//**************************************************************************
112//  INLINE HELPERS
113//**************************************************************************
114
115//-------------------------------------------------
116//  update_cpu -
117//-------------------------------------------------
118
119inline void superpet_device::update_cpu(int cpu)
120{
121   if (cpu)
122   {
123      // 6502 active
124      m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
125      machine().firstcpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
126   }
127   else
128   {
129      // 6809 active
130      m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE);
131      machine().firstcpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
132   }
133}
134
135
136
137//**************************************************************************
138//  LIVE DEVICE
139//**************************************************************************
140
141//-------------------------------------------------
142//  superpet_device - constructor
143//-------------------------------------------------
144
145superpet_device::superpet_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
146   device_t(mconfig, SUPERPET, "SuperPET", tag, owner, clock),
147   device_pet_expansion_card_interface(mconfig, *this),
148   m_maincpu(*this, M6809_TAG),
149   m_acia(*this, M6551_TAG),
150   m_dongle(*this, MOS6702_TAG),
151   m_rom(*this, M6809_TAG),
152   m_ram(*this, "ram"),
153   m_sw1(*this, "SW1"),
154   m_sw2(*this, "SW2"),
155   m_system(0),
156   m_bank(0),
157   m_sel9_rom(0),
158   m_pet_irq(CLEAR_LINE),
159   m_acia_irq(CLEAR_LINE)
160{
161}
162
163
164//-------------------------------------------------
165//  device_start - device-specific startup
166//-------------------------------------------------
167
168void superpet_device::device_start()
169{
170   // allocate memory
171   m_ram.allocate(0x10000);
172
173   // state saving
174   save_item(NAME(m_system));
175   save_item(NAME(m_bank));
176   save_item(NAME(m_sel9_rom));
177}
178
179
180//-------------------------------------------------
181//  device_reset - device-specific reset
182//-------------------------------------------------
183
184void superpet_device::device_reset()
185{
186   m_maincpu->reset();
187   m_acia->reset();
188   m_dongle->reset();
189
190   m_system = 0;
191   m_bank = 0;
192   m_sel9_rom = 0;
193
194   update_cpu(BIT(m_system, 0));
195}
196
197
198//-------------------------------------------------
199//  pet_norom_r - NO ROM read
200//-------------------------------------------------
201
202int superpet_device::pet_norom_r(address_space &space, offs_t offset, int sel)
203{
204   return BIT(m_system, 0);
205}
206
207
208//-------------------------------------------------
209//  pet_bd_r - buffered data read
210//-------------------------------------------------
211
212UINT8 superpet_device::pet_bd_r(address_space &space, offs_t offset, UINT8 data, int sel)
213{
214   int norom = pet_norom_r(space, offset, sel);
215
216   switch (sel)
217   {
218   case SEL9:
219      if (m_sel9_rom)
220      {
221         data = m_rom->base()[offset - 0x9000];
222      }
223      else
224      {
225         data = m_ram[((m_bank & 0x0f) << 12) | (offset & 0xfff)];
226      }
227      break;
228
229   case SELA: case SELB: case SELC: case SELD: case SELF:
230      if (!norom)
231      {
232         data = m_rom->base()[offset - 0x9000];
233      }
234      break;
235
236   case SELE:
237      if (!norom && !BIT(offset, 11))
238      {
239         data = m_rom->base()[offset - 0x9000];
240      }
241      break;
242   }
243
244   switch (offset)
245   {
246   case 0xefe0:
247   case 0xefe1:
248   case 0xefe2:
249   case 0xefe3:
250      data = m_dongle->read(space, offset & 0x03);
251      break;
252
253   case 0xeff0:
254   case 0xeff1:
255   case 0xeff2:
256   case 0xeff3:
257      data = m_acia->read(space, offset & 0x03);
258      break;
259   }
260
261   return data;
262}
263
264
265//-------------------------------------------------
266//  pet_bd_w - buffered data write
267//-------------------------------------------------
268
269void superpet_device::pet_bd_w(address_space &space, offs_t offset, UINT8 data, int sel)
270{
271   switch (sel)
272   {
273   case SEL9:
274      if (!m_sel9_rom && BIT(m_system, 1))
275      {
276         m_ram[((m_bank & 0x0f) << 12) | (offset & 0xfff)] = data;
277      }
278      break;
279   }
280
281   switch (offset)
282   {
283   case 0xefe0:
284   case 0xefe1:
285   case 0xefe2:
286   case 0xefe3:
287      m_dongle->write(space, offset & 0x03, data);
288      printf("6702 %u %02x\n", offset & 0x03, data);
289      break;
290
291   case 0xeff0:
292   case 0xeff1:
293   case 0xeff2:
294   case 0xeff3:
295      m_acia->write(space, offset & 0x03, data);
296      break;
297
298   case 0xeff8:
299   case 0xeff9:
300      if (BIT(m_bank, 7))
301      {
302         /*
303         
304             bit     description
305         
306             0       SW2 CPU (0=6809, 1=6502)
307             1       SW1 RAM (0=read only, 1=read/write)
308             2       
309             3       DIAG
310             4       
311             5       
312             6       
313             7       
314         
315         */
316
317         m_system = data;
318         update_cpu(BIT(m_system, 0));
319         printf("SYSTEM %02x\n", data);
320      }
321      break;
322
323   case 0xeffc:
324   case 0xeffd:
325      /*
326     
327          bit     description
328     
329          0       A0
330          1       A1
331          2       A2
332          3       SEL A
333          4       J1 pin 40
334          5       SEL B
335          6       J1 pin 39
336          7       BIT 7
337     
338      */
339
340      m_bank = data;
341      printf("BANK %02x\n", data);
342      break;
343   }
344}
345
346
347//-------------------------------------------------
348//  pet_diag_r - DIAG read
349//-------------------------------------------------
350
351int superpet_device::pet_diag_r()
352{
353   return BIT(m_system, 3);
354}
355
356
357//-------------------------------------------------
358//  pet_irq_w - IRQ write
359//-------------------------------------------------
360
361void superpet_device::pet_irq_w(int state)
362{
363   m_pet_irq = state;
364
365   //m_maincpu->set_input_line(M6809_IRQ_LINE, m_pet_irq || m_acia_irq);
366}
367
368
369//-------------------------------------------------
370//  read -
371//-------------------------------------------------
372
373READ8_MEMBER( superpet_device::read )
374{
375   return m_slot->dma_bd_r(offset);
376}
377
378
379//-------------------------------------------------
380//  write -
381//-------------------------------------------------
382
383WRITE8_MEMBER( superpet_device::write )
384{
385   m_slot->dma_bd_w(offset, data);
386}
Property changes on: trunk/src/mess/machine/superpet.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/mess/machine/superpet.h
r0r20746
1/**********************************************************************
2
3    Commodore SuperPET emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#pragma once
11
12#ifndef __SUPERPET__
13#define __SUPERPET__
14
15
16#include "emu.h"
17#include "cpu/m6809/m6809.h"
18#include "machine/6551acia.h"
19#include "machine/mos6702.h"
20#include "machine/petexp.h"
21
22
23
24//**************************************************************************
25//  TYPE DEFINITIONS
26//**************************************************************************
27
28// ======================> superpet_device
29
30class superpet_device : public device_t,
31                  public device_pet_expansion_card_interface
32{
33public:
34   // construction/destruction
35   superpet_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
36
37   // optional information overrides
38   virtual const rom_entry *device_rom_region() const;
39   virtual machine_config_constructor device_mconfig_additions() const;
40   virtual ioport_constructor device_input_ports() const;
41
42   DECLARE_READ8_MEMBER( read );
43   DECLARE_WRITE8_MEMBER( write );
44
45protected:
46   // device-level overrides
47   virtual void device_config_complete() { m_shortname = "pet_superpet"; }
48   virtual void device_start();
49   virtual void device_reset();
50
51   // device_pet_expansion_card_interface overrides
52   virtual int pet_norom_r(address_space &space, offs_t offset, int sel);
53   virtual UINT8 pet_bd_r(address_space &space, offs_t offset, UINT8 data, int sel);
54   virtual void pet_bd_w(address_space &space, offs_t offset, UINT8 data, int sel);
55   virtual int pet_diag_r();
56   virtual void pet_irq_w(int state);
57
58   enum
59   {
60      SEL0 = 0,
61      SEL1,
62      SEL2,
63      SEL3,
64      SEL4,
65      SEL5,
66      SEL6,
67      SEL7,
68      SEL8,
69      SEL9,
70      SELA,
71      SELB,
72      SELC,
73      SELD,
74      SELE,
75      SELF
76   };
77
78private:
79   required_device<cpu_device> m_maincpu;
80   required_device<acia6551_device> m_acia;
81   required_device<mos6702_device> m_dongle;
82   required_memory_region m_rom;
83   optional_shared_ptr<UINT8> m_ram;
84   required_ioport m_sw1;
85   required_ioport m_sw2;
86
87   inline void update_cpu(int cpu);
88
89   UINT8 m_system;
90   UINT8 m_bank;
91   int m_sel9_rom;
92   int m_pet_irq;
93   int m_acia_irq;
94};
95
96
97// device type definition
98extern const device_type SUPERPET;
99
100
101#endif
Property changes on: trunk/src/mess/machine/superpet.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/machine/petexp.c
r20745r20746
7272
7373
7474//-------------------------------------------------
75//  device_config_complete - perform any
76//  operations now that the configuration is
77//  complete
78//-------------------------------------------------
79
80void pet_expansion_slot_device::device_config_complete()
81{
82   // inherit a copy of the static data
83   const pet_expansion_slot_interface *intf = reinterpret_cast<const pet_expansion_slot_interface *>(static_config());
84   if (intf != NULL)
85   {
86      *static_cast<pet_expansion_slot_interface *>(this) = *intf;
87   }
88
89   // or initialize to defaults if none provided
90   else
91   {
92      memset(&m_in_dma_bd_cb, 0, sizeof(m_in_dma_bd_cb));
93      memset(&m_out_dma_bd_cb, 0, sizeof(m_out_dma_bd_cb));
94   }
95}
96
97
98//-------------------------------------------------
7599//  device_start - device-specific startup
76100//-------------------------------------------------
77101
78102void pet_expansion_slot_device::device_start()
79103{
80104   m_card = dynamic_cast<device_pet_expansion_card_interface *>(get_card_device());
105
106   // resolve callbacks
107   m_in_dma_bd_func.resolve(m_in_dma_bd_cb, *this);
108   m_out_dma_bd_func.resolve(m_out_dma_bd_cb, *this);
81109}
82110
83111
r20745r20746
105133
106134
107135//-------------------------------------------------
108//  read - cartridge data read
136//  read - buffered data read
109137//-------------------------------------------------
110138
111139UINT8 pet_expansion_slot_device::read(address_space &space, offs_t offset, UINT8 data, int sel)
r20745r20746
120148
121149
122150//-------------------------------------------------
123//  write - cartridge data write
151//  write - buffered data write
124152//-------------------------------------------------
125153
126154void pet_expansion_slot_device::write(address_space &space, offs_t offset, UINT8 data, int sel)
r20745r20746
133161
134162
135163//-------------------------------------------------
164//  diag_r - DIAG read
165//-------------------------------------------------
166
167READ_LINE_MEMBER( pet_expansion_slot_device::diag_r )
168{
169   return m_card ? m_card->pet_diag_r() : 1;
170}
171
172
173//-------------------------------------------------
174//  irq_w - IRQ write
175//-------------------------------------------------
176
177WRITE_LINE_MEMBER( pet_expansion_slot_device::irq_w )
178{
179   if (m_card) m_card->pet_irq_w(state);
180}
181
182
183//-------------------------------------------------
184//  dma_bd_r - DMA read
185//-------------------------------------------------
186
187UINT8 pet_expansion_slot_device::dma_bd_r(offs_t offset)
188{
189   return m_in_dma_bd_func(offset);
190}
191
192
193//-------------------------------------------------
194//  dma_bd_w - DMA write
195//-------------------------------------------------
196
197void pet_expansion_slot_device::dma_bd_w(offs_t offset, UINT8 data)
198{
199   m_out_dma_bd_func(offset, data);
200}
201
202
203//-------------------------------------------------
136204//  phi2 - system clock frequency
137205//-------------------------------------------------
138206
trunk/src/mess/machine/petexp.h
r20745r20746
3030//  INTERFACE CONFIGURATION MACROS
3131//**************************************************************************
3232
33#define MCFG_PET_EXPANSION_SLOT_ADD(_tag, _clock, _slot_intf, _def_slot, _def_inp) \
33#define PET_EXPANSION_INTERFACE(_name) \
34   const pet_expansion_slot_interface (_name) =
35
36
37#define MCFG_PET_EXPANSION_SLOT_ADD(_tag, _clock, _config, _slot_intf, _def_slot, _def_inp) \
3438   MCFG_DEVICE_ADD(_tag, PET_EXPANSION_SLOT, _clock) \
39   MCFG_DEVICE_CONFIG(_config) \
3540   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
3641
3742
r20745r20746
4045//  TYPE DEFINITIONS
4146//**************************************************************************
4247
48// ======================> pet_expansion_slot_interface
49
50struct pet_expansion_slot_interface
51{
52   devcb_read8         m_in_dma_bd_cb;
53   devcb_write8        m_out_dma_bd_cb;
54};
55
56
4357// ======================> pet_expansion_slot_device
4458
4559class device_pet_expansion_card_interface;
4660
4761class pet_expansion_slot_device : public device_t,
48                           public device_slot_interface
62                           public device_slot_interface,
63                           public pet_expansion_slot_interface
4964{
5065public:
5166   // construction/destruction
r20745r20746
5671   int norom_r(address_space &space, offs_t offset, int sel);
5772   UINT8 read(address_space &space, offs_t offset, UINT8 data, int sel);
5873   void write(address_space &space, offs_t offset, UINT8 data, int sel);
74   DECLARE_READ_LINE_MEMBER( diag_r );
75   DECLARE_WRITE_LINE_MEMBER( irq_w );
5976
6077   // cartridge interface
78   UINT8 dma_bd_r(offs_t offset);
79   void dma_bd_w(offs_t offset, UINT8 data);
6180   int phi2();
6281
6382protected:
6483   // device-level overrides
65   virtual void device_config_complete() { m_shortname = "petexp"; }
84   virtual void device_config_complete();
6685   virtual void device_start();
6786   virtual void device_reset();
6887
6988   device_pet_expansion_card_interface *m_card;
89
90   devcb_resolved_read8        m_in_dma_bd_func;
91   devcb_resolved_write8       m_out_dma_bd_func;
7092};
7193
7294
r20745r20746
86108   virtual int pet_norom_r(address_space &space, offs_t offset, int sel) { return 1; }
87109   virtual UINT8 pet_bd_r(address_space &space, offs_t offset, UINT8 data, int sel) { return data; };
88110   virtual void pet_bd_w(address_space &space, offs_t offset, UINT8 data, int sel) { };
111   virtual int pet_diag_r() { return 1; }
112   virtual void pet_irq_w(int state) { }
89113
90114   pet_expansion_slot_device *m_slot;
91115};
trunk/src/mess/machine/mos6702.c
r0r20746
1/**********************************************************************
2
3    MOS Technology 6702 Mystery Device emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "mos6702.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 MOS6702 = &device_creator<mos6702_device>;
27
28
29
30//**************************************************************************
31//  LIVE DEVICE
32//**************************************************************************
33
34//-------------------------------------------------
35//  mos6702_device - constructor
36//-------------------------------------------------
37
38mos6702_device::mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
39   : device_t(mconfig, MOS6702, "MOS6702", tag, owner, clock)
40{
41}
42
43
44//-------------------------------------------------
45//  device_start - device-specific startup
46//-------------------------------------------------
47
48void mos6702_device::device_start()
49{
50}
51
52
53//-------------------------------------------------
54//  read -
55//-------------------------------------------------
56
57READ8_MEMBER( mos6702_device::read )
58{
59   return 0;
60}
61
62
63//-------------------------------------------------
64//  write -
65//-------------------------------------------------
66
67WRITE8_MEMBER( mos6702_device::write )
68{
69}
Property changes on: trunk/src/mess/machine/mos6702.c
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/machine/mos6702.h
r0r20746
1/**********************************************************************
2
3    MOS Technology 6702 Mystery Device emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9                            _____   _____
10                  R/_W   1 |*    \_/     | 20  Vcc
11                    D7   2 |             | 19  CS0
12                    D6   3 |             | 18  CS1
13                    D5   4 |             | 17  CS2
14                    D4   5 |   MOS6702   | 16  CS3
15                    D3   6 |             | 15  _CS4
16                    D2   7 |             | 14  _CS5
17                    D1   8 |             | 13  _CS5
18                    D0   9 |             | 12  _RTS
19                   Vss  10 |_____________| 11  phi2
20
21**********************************************************************/
22
23#pragma once
24
25#ifndef __MOS6702__
26#define __MOS6702__
27
28#include "emu.h"
29
30
31
32//**************************************************************************
33//  INTERFACE CONFIGURATION MACROS
34//**************************************************************************
35
36#define MCFG_MOS6702_ADD(_tag, _clock) \
37   MCFG_DEVICE_ADD(_tag, MOS6702, _clock)
38
39
40
41//**************************************************************************
42//  TYPE DEFINITIONS
43//**************************************************************************
44
45// ======================> mos6702_device
46
47class mos6702_device :  public device_t
48{
49public:
50   // construction/destruction
51   mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
52
53   DECLARE_READ8_MEMBER( read );
54   DECLARE_WRITE8_MEMBER( write );
55
56protected:
57   // device-level overrides
58   virtual void device_config_complete() { m_shortname = "mos6702"; }
59   virtual void device_start();
60};
61
62
63// device type definition
64extern const device_type MOS6702;
65
66
67
68#endif
Property changes on: trunk/src/mess/machine/mos6702.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/mess/includes/pet2001.h
r20745r20746
66#include "emu.h"
77#include "cpu/m6502/m6502.h"
88#include "formats/cbm_snqk.h"
9#include "machine/6821pia.h"
109#include "machine/6522via.h"
10#include "machine/6821pia.h"
1111#include "machine/cbmipt.h"
1212#include "machine/ieee488.h"
1313#include "machine/petcass.h"
r20745r20746
2222#define M6520_1_TAG    "g8"
2323#define M6520_2_TAG    "b8"
2424#define MC6845_TAG      "ub13"
25#define M6809_TAG      "u4"
2625#define SCREEN_TAG      "screen"
2726
2827class pet_state : public driver_device
trunk/src/mess/mess.lst
r20745r20746
600600cbm8032_se
601601superpet
602602mmf9000
603mmf9000_se
603604cbm8096
604605cbm8296
605606cbm8296d
trunk/src/mess/drivers/cbm2.c
r20745r20746
15841584   data |= m_ieee1->read(space, 0);
15851585
15861586   // user port
1587   data |= m_user->d1_r(space, 0);
1587   data &= m_user->d1_r(space, 0);
15881588
15891589   // joystick
15901590   data &= ~(!BIT(m_joy1->joy_r(), 5) << 6);
trunk/src/mess/drivers/pet2001.c
r20745r20746
134134
135135   - accurate video timing for non-CRTC models
136136   - PET 4000-12 (40 column CRTC models)
137   - High Speed Graphics board
138   - keyboard layouts
139      - Swedish
140      - German
137141   - SuperPET
142      - 6809
143      - OS/9 MMU
138144   - 8096
139145      - 64k expansion
140146   - 8296
r20745r20746
161167   int irq = m_via_irq || m_pia1a_irq || m_pia1b_irq || m_pia2a_irq || m_pia2b_irq || m_exp_irq;
162168
163169   m_maincpu->set_input_line(M6502_IRQ_LINE, irq);
170   m_exp->irq_w(irq);
164171}
165172
166173
r20745r20746
704711   data |= m_ieee->eoi_r() << 6;
705712
706713   // diagnostic jumper
707   data |= 0x80;
714   data |= m_exp->diag_r() << 7;
708715
709716   return data;
710717}
r20745r20746
894901
895902
896903//-------------------------------------------------
904//  PET_EXPANSION_INTERFACE( exp_intf )
905//-------------------------------------------------
906
907static PET_EXPANSION_INTERFACE( exp_intf )
908{
909   DEVCB_DRIVER_MEMBER(pet_state, read),
910   DEVCB_DRIVER_MEMBER(pet_state, write)
911};
912
913
914//-------------------------------------------------
897915//  PET_USER_PORT_INTERFACE( user_intf )
898916//-------------------------------------------------
899917
r20745r20746
11861204   MCFG_CBM_IEEE488_ADD(ieee488_intf, "c4040")
11871205   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c2n", NULL)
11881206   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, datassette2_intf, cbm_datassette_devices, NULL, NULL)
1189   MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_8MHz/8, pet_expansion_cards, NULL, NULL)
1207   MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_8MHz/8, exp_intf, pet_expansion_cards, NULL, NULL)
11901208   MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, user_intf, pet_user_port_cards, NULL, NULL)
11911209   MCFG_QUICKLOAD_ADD("quickload", cbm_pet, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
11921210
r20745r20746
14621480   MCFG_CBM_IEEE488_ADD(ieee488_intf, "c8050")
14631481   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c2n", NULL)
14641482   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, datassette2_intf, cbm_datassette_devices, NULL, NULL)
1465   MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_16MHz/16, pet_expansion_cards, NULL, NULL)
1483   MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_16MHz/16, exp_intf, pet_expansion_cards, NULL, NULL)
14661484   MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, user_intf, pet_user_port_cards, NULL, NULL)
14671485   MCFG_QUICKLOAD_ADD("quickload", cbm_pet, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
14681486
r20745r20746
14851503//  MACHINE_CONFIG( superpet )
14861504//-------------------------------------------------
14871505
1488static MACHINE_CONFIG_DERIVED_CLASS( superpet, pet80, superpet_state )
1489   MCFG_RAM_ADD(RAM_TAG)
1490   MCFG_RAM_DEFAULT_SIZE("96K")
1506static MACHINE_CONFIG_DERIVED_CLASS( superpet, pet8032, superpet_state )
1507   MCFG_DEVICE_REMOVE(PET_EXPANSION_SLOT_TAG)
1508   MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_16MHz/16, exp_intf, pet_expansion_cards, "superpet", NULL)
14911509
14921510   MCFG_SOFTWARE_LIST_ADD("flop_list2", "superpet_flop")
14931511MACHINE_CONFIG_END
r20745r20746
17501768   ROM_LOAD( "901465-23.ud10", 0x2000, 0x1000, CRC(ae3deac0) SHA1(975ee25e28ff302879424587e5fb4ba19f403adc) )  // BASIC 4
17511769   ROM_LOAD( "901465-20.ud9", 0x3000, 0x1000, CRC(0fc17b9c) SHA1(242f98298931d21eaacb55fe635e44b7fc192b0a) )   // BASIC 4
17521770   ROM_LOAD( "901465-21.ud8", 0x4000, 0x1000, CRC(36d91855) SHA1(1bb236c72c726e8fb029c68f9bfa5ee803faf0a8) )   // BASIC 4
1753   ROM_LOAD( "swedish.bin",   0x5000, 0x0800, CRC(75901dd7) SHA1(2ead0d83255a344a42bb786428353ca48d446d03) )   // It had a label "8000-UD7, SCREEN-04"
1771   ROM_LOAD( "8000-ud7, screen-04.ud7", 0x5000, 0x0800, CRC(75901dd7) SHA1(2ead0d83255a344a42bb786428353ca48d446d03) )
17541772   ROM_LOAD( "901465-22.ud6", 0x6000, 0x1000, CRC(cc5298a1) SHA1(96a0fa56e0c937da92971d9c99d504e44e898806) )   // Kernal
17551773
17561774   ROM_REGION( 0x800, "charom", 0 )
r20745r20746
17691787   ROM_LOAD( "901465-23.ud10", 0x2000, 0x1000, CRC(ae3deac0) SHA1(975ee25e28ff302879424587e5fb4ba19f403adc) )  // BASIC 4
17701788   ROM_LOAD( "901465-20.ud9", 0x3000, 0x1000, CRC(0fc17b9c) SHA1(242f98298931d21eaacb55fe635e44b7fc192b0a) )   // BASIC 4
17711789   ROM_LOAD( "901465-21.ud8", 0x4000, 0x1000, CRC(36d91855) SHA1(1bb236c72c726e8fb029c68f9bfa5ee803faf0a8) )   // BASIC 4
1772   ROM_LOAD( "901474-03.ud7", 0x5000, 0x0800, CRC(5674dd5e) SHA1(c605fa343fd77c73cbe1e0e9567e2f014f6e7e30) )   // Screen Editor (80 columns, CRTC 60Hz, Business Keyb)
1790   ROM_LOAD( "901474-04.ud7", 0x5000, 0x0800, CRC(abb000e7) SHA1(66887061b6c4ebef7d6efb90af9afd5e2c3b08ba) )   // Screen Editor (80 columns, CRTC 50Hz, Business Keyb)
17731791   ROM_LOAD( "901465-22.ud6", 0x6000, 0x1000, CRC(cc5298a1) SHA1(96a0fa56e0c937da92971d9c99d504e44e898806) )   // Kernal
17741792
1775   ROM_REGION( 0x7000, M6809_TAG, 0 )
1776   ROM_LOAD( "901898-01.u17", 0x1000, 0x1000, CRC(728a998b) SHA1(0414b3ab847c8977eb05c2fcc72efcf2f9d92871) )
1777   ROM_LOAD( "901898-02.u18", 0x2000, 0x1000, CRC(6beb7c62) SHA1(df154939b934d0aeeb376813ec1ba0d43c2a3378) )
1778   ROM_LOAD( "901898-03.u19", 0x3000, 0x1000, CRC(5db4983d) SHA1(6c5b0cce97068f8841112ba6d5cd8e568b562fa3) )
1779   ROM_LOAD( "901898-04.u20", 0x4000, 0x1000, CRC(f55fc559) SHA1(b42a2050a319a1ffca7868a8d8d635fadd37ec37) )
1780   ROM_LOAD( "901897-01.u21", 0x5000, 0x0800, CRC(b2cee903) SHA1(e8ce8347451a001214a5e71a13081b38b4be23bc) )
1781   ROM_LOAD( "901898-05.u22", 0x6000, 0x1000, CRC(f42df0cb) SHA1(9b4a5134d20345171e7303445f87c4e0b9addc96) )
1782
1783   ROM_REGION( 0x800, "charom", 0 )
1784   ROM_LOAD( "901447-10.ua3", 0x000, 0x800, CRC(d8408674) SHA1(0157a2d55b7ac4eaeb38475889ebeea52e2593db) )    // Character Generator
1793   ROM_REGION( 0x1000, "charom", 0 )
1794   ROM_LOAD( "901640-01.ua3", 0x0000, 0x1000, CRC(ee8229c4) SHA1(bf346f11595a3e65e55d6aeeaa2c0cec807b66c7) )
17851795ROM_END
17861796
17871797#define rom_mmf9000 rom_superpet
17881798
17891799
17901800//-------------------------------------------------
1801//  ROM( mmf9000_se )
1802//-------------------------------------------------
1803
1804ROM_START( mmf9000_se )
1805   ROM_REGION( 0x7000, M6502_TAG, 0 )
1806   ROM_CART_LOAD( "9000", 0x0000, 0x1000, ROM_MIRROR )
1807   ROM_CART_LOAD( "a000", 0x1000, 0x1000, ROM_MIRROR )
1808   ROM_LOAD( "901465-23.ud10", 0x2000, 0x1000, CRC(ae3deac0) SHA1(975ee25e28ff302879424587e5fb4ba19f403adc) )  // BASIC 4
1809   ROM_LOAD( "901465-20.ud9", 0x3000, 0x1000, CRC(0fc17b9c) SHA1(242f98298931d21eaacb55fe635e44b7fc192b0a) )   // BASIC 4
1810   ROM_LOAD( "901465-21.ud8", 0x4000, 0x1000, CRC(36d91855) SHA1(1bb236c72c726e8fb029c68f9bfa5ee803faf0a8) )   // BASIC 4
1811   ROM_LOAD( "8000-ud7, screen-04.ud7", 0x5000, 0x0800, CRC(75901dd7) SHA1(2ead0d83255a344a42bb786428353ca48d446d03) )
1812   ROM_LOAD( "901465-22.ud6", 0x6000, 0x1000, CRC(cc5298a1) SHA1(96a0fa56e0c937da92971d9c99d504e44e898806) )   // Kernal
1813
1814   ROM_REGION( 0x1000, "charom", 0 )
1815   ROM_LOAD( "901640-01 skand.gen.ua3", 0x0000, 0x1000, CRC(da1cd630) SHA1(35f472114ff001259bdbae073ae041b0759e32cb) )
1816ROM_END
1817
1818
1819//-------------------------------------------------
17911820//  ROM( cbm8296 )
17921821//-------------------------------------------------
17931822
r20745r20746
18951924COMP( 1981,   cbm8032_se,   pet8032,   0,      pet8032,   petb_se,   driver_device,   0,   "Commodore Business Machines",   "CBM 8032 (Sweden/Finland)",   GAME_SUPPORTS_SAVE )
18961925COMP( 1981,   superpet,   pet8032,   0,      superpet,   petb,      driver_device,   0,   "Commodore Business Machines",   "SuperPET SP-9000",            GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
18971926COMP( 1981,   mmf9000,   pet8032,   0,      superpet,   petb,      driver_device,   0,   "Commodore Business Machines",   "MicroMainFrame 9000",         GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
1927COMP( 1981,   mmf9000_se,   pet8032,   0,      superpet,   petb_se,   driver_device,   0,   "Commodore Business Machines",   "MicroMainFrame 9000 (Sweden/Finland)",         GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
18981928COMP( 1981,   cbm8096,   pet8032,   0,      cbm8096,   petb,      driver_device,   0,   "Commodore Business Machines",   "CBM 8096",                  GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
18991929COMP( 1984,   cbm8296,   0,         0,      cbm8296,   petb,      driver_device,   0,   "Commodore Business Machines",   "CBM 8296",                  GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
19001930COMP( 1984,   cbm8296d,   cbm8296,   0,      cbm8296d,   petb,      driver_device,   0,   "Commodore Business Machines",   "CBM 8296D",               GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mess/mess.mak
r20745r20746
828828   $(MESS_MACHINE)/petcass.o   \
829829   $(MESS_MACHINE)/petexp.o   \
830830   $(MESS_MACHINE)/petuser.o   \
831   $(MESS_MACHINE)/superpet.o   \
832   $(MESS_MACHINE)/mos6702.o   \
831833   $(MESS_DRIVERS)/c64.o       \
832834   $(MESS_MACHINE)/c64_legacy.o       \
833835   $(MESS_DRIVERS)/c64dtv.o    \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team