Previous 15994 Revisions Next

r13679 Thursday 22nd December, 2011 at 20:24:16 UTC by R. Belmont
mac: Added preliminary Cuda skeleton. Doesn't sync up properly with 68k yet. [R. Belmont, Paul Pratt]
[src/mess]mess.mak mess_dev.lst
[src/mess/drivers]mac.c
[src/mess/includes]mac.h
[src/mess/machine]cuda.c* cuda.h* mac.c

src/mess/machine/cuda.c
r0r13679
1/*
2    Apple "Cuda" ADB/system controller MCU
3    Emulation by R. Belmont
4
5    Port definitions, primarily from the schematics.
6
7    Port A:
8
9    x-------  O  ADB data line out
10    -x------  I  ADB data line in
11    --x-----  I  System type.  0 = "secure" power, 1 = "passive" or "soft" power
12    ---x----  O  DFAC latch
13    ----x---  O  "Fast Reset"
14    -----x--  I  Keyboard power switch
15    ------x-  I  Chassis switch for "soft" power, pull up for "secure" or "passive"
16    -------x  I  Pull up for "passive", "PFW" for "secure" or "soft"
17
18    Port B:
19
20    x-------  O  DFAC bit clock
21    -x------  B  DFAC data I/O (used in both directions)
22    --x-----  B  VIA shift register data (used in both directions)
23    ---x----  O  VIA clock
24    ----x---  I  VIA TIP
25    -----x--  I  VIA BYTEACK
26    ------x-  O  VIA TREQ
27    -------x  I  +5v sense
28
29    Port C:
30    x---      O  680x0 reset
31    -x--      ?  680x0 IPL 2 (used in both directions)
32    --x-      ?  IPL 1 for "passive" power, trickle sense for "soft" and "secure"
33    ---x     ?  IPL 0 for "passive" power, pull-up for "soft" power, file server switch for "secure" power
34*/
35
36#define ADDRESS_MAP_MODERN
37
38#define CUDA_SUPER_VERBOSE
39
40#include "emu.h"
41#include "cuda.h"
42#include "cpu/m6805/m6805.h"
43#include "machine/6522via.h"
44#include "sound/asc.h"
45#include "includes/mac.h"
46
47//**************************************************************************
48//  MACROS / CONSTANTS
49//**************************************************************************
50
51#define CUDA_CPU_TAG   "cuda"
52
53//**************************************************************************
54//  DEVICE DEFINITIONS
55//**************************************************************************
56
57const device_type CUDA = &device_creator<cuda_device>;
58
59ROM_START( cuda )
60   ROM_REGION(0x3300, CUDA_CPU_TAG, 0)
61    ROM_LOAD( "341s0060.bin", 0x1100, 0x1100, CRC(0f5e7b4a) SHA1(972b3778146d9787b18c3a9874d505cf606b3e15) )
62    ROM_LOAD( "341s0788.bin", 0x2200, 0x1100, CRC(df6e1b43) SHA1(ec23cc6214c472d61b98964928c40589517a3172) )
63ROM_END
64
65//-------------------------------------------------
66//  ADDRESS_MAP
67//-------------------------------------------------
68
69static ADDRESS_MAP_START( cuda_map, AS_PROGRAM, 8, cuda_device )
70   AM_RANGE(0x0000, 0x0002) AM_READWRITE(ports_r, ports_w)
71   AM_RANGE(0x0004, 0x0006) AM_READWRITE(ddr_r, ddr_w)
72   AM_RANGE(0x0007, 0x0007) AM_READWRITE(pll_r, pll_w)
73   AM_RANGE(0x0008, 0x0008) AM_READWRITE(timer_ctrl_r, timer_ctrl_w)
74   AM_RANGE(0x0009, 0x0009) AM_READWRITE(timer_counter_r, timer_counter_w)
75   AM_RANGE(0x0012, 0x0012) AM_READWRITE(onesec_r, onesec_w)
76   AM_RANGE(0x0090, 0x00ff) AM_RAM                     // work RAM and stack
77   AM_RANGE(0x0100, 0x01ff) AM_READWRITE(pram_r, pram_w)
78   AM_RANGE(0x0f00, 0x1fff) AM_ROM AM_REGION(CUDA_CPU_TAG, 0)
79ADDRESS_MAP_END
80
81//-------------------------------------------------
82//  MACHINE_CONFIG
83//-------------------------------------------------
84
85static MACHINE_CONFIG_FRAGMENT( cuda )
86   MCFG_CPU_ADD(CUDA_CPU_TAG, M68HC05EG, XTAL_32_768kHz*192)   // 32.768 kHz input clock, can be PLL'ed to x128 = 4.1 MHz under s/w control
87   MCFG_CPU_PROGRAM_MAP(cuda_map)
88MACHINE_CONFIG_END
89
90
91//-------------------------------------------------
92//  machine_config_additions - device-specific
93//  machine configurations
94//-------------------------------------------------
95
96machine_config_constructor cuda_device::device_mconfig_additions() const
97{
98   return MACHINE_CONFIG_NAME( cuda );
99}
100
101const rom_entry *cuda_device::device_rom_region() const
102{
103   return ROM_NAME( cuda );
104}
105
106//**************************************************************************
107//  LIVE DEVICE
108//**************************************************************************
109
110void cuda_device::send_port(address_space &space, UINT8 offset, UINT8 data)
111{
112   switch (offset)
113   {
114      case 0: // port A
115/*          printf("ADB:%d DFAC:%d PowerEnable:%d\n",
116                (data & 0x80) ? 1 : 0,
117                (data & 0x10) ? 1 : 0,
118                (data & 0x02) ? 1 : 0);*/
119
120         if ((data & 0x80) != last_adb)
121         {
122/*              if (data & 0x80)
123                {
124                    printf("CU ADB: 1->0 time %lld\n", m_maincpu->total_cycles()-last_adb_time);
125                }
126                else
127                {
128                    printf("CU ADB: 0->1 time %lld\n", m_maincpu->total_cycles()-last_adb_time);
129                }*/
130            last_adb = data & 0x80;
131            last_adb_time = m_maincpu->total_cycles();
132         }
133         break;
134
135        case 1: // port B
136            {
137            if (treq != ((data>>1)&1))
138            {
139               #ifdef CUDA_SUPER_VERBOSE
140                    printf("CU-> TREQ: %d (PC=%x)\n", (data>>1)&1, cpu_get_pc(m_maincpu));
141               #endif
142               treq = (data>>1) & 1;
143            }
144                if (via_data != ((data>>5)&1))
145                {
146               #ifdef CUDA_SUPER_VERBOSE
147                    printf("CU-> VIA_DATA: %d (PC=%x)\n", (data>>5)&1, cpu_get_pc(m_maincpu));
148               #endif
149               via_data = (data>>5) & 1;
150                }
151                if (via_clock != ((data>>4)&1))
152                {
153               #ifdef CUDA_SUPER_VERBOSE
154                    printf("CU-> VIA_CLOCK: %d (PC=%x)\n", ((data>>4)&1)^1, cpu_get_pc(m_maincpu));
155               #endif
156               via_clock = (data>>4) & 1;
157               via6522_device *via1 = machine().device<via6522_device>("via6522_0");
158               via1->write_cb1(via_clock);
159                }
160            }
161            break;
162
163      case 2: // port C
164         if ((data & 8) != reset_line)
165         {
166            #ifdef CUDA_SUPER_VERBOSE
167            printf("680x0 reset: %d -> %d\n", (ports[2] & 8)>>3, (data & 8)>>3);
168            #endif
169            reset_line = (data & 8);
170
171            // falling edge, should reset the machine too
172            if ((ports[2] & 8) && !(data&8))
173            {
174               mac_state *mac = machine().driver_data<mac_state>();
175
176               // force the memory overlay
177               mac->set_memory_overlay(0);
178               mac->set_memory_overlay(1);
179
180               // if PRAM's waiting to be loaded, transfer it now
181               if (!pram_loaded)
182               {
183                  memcpy(pram, disk_pram, 0x100);
184                  pram_loaded = true;
185               }
186            }
187
188            cputag_set_input_line(machine(), "maincpu", INPUT_LINE_RESET, (reset_line & 8) ? ASSERT_LINE : CLEAR_LINE);
189         }
190         break;
191   }
192}
193
194READ8_MEMBER( cuda_device::ddr_r )
195{
196   return ddrs[offset];
197}
198
199WRITE8_MEMBER( cuda_device::ddr_w )
200{
201/*  printf("%02x to DDR %c\n", data, 'A' + offset);*/
202
203   send_port(space, offset, ports[offset] & data);
204
205   ddrs[offset] = data;
206}
207
208READ8_MEMBER( cuda_device::ports_r )
209{
210   UINT8 incoming = 0;
211
212   switch (offset)
213   {
214      case 0:    // port A
215//          incoming |= adb_in ? 0x40 : 0;
216
217         if (cuda_controls_power)
218         {
219            incoming = 0x20 | 0x03;
220         }
221         else
222         {
223            incoming |= 0x23;   // indicate passive power
224         }
225         break;
226
227        case 1:      // port B
228            if (cuda_controls_power)
229            {
230                incoming |= 0x01;   // 0 for passive power, apparently
231            }
232            incoming |= byteack<<2;
233            incoming |= tip<<3;
234            incoming |= via_data<<5;
235         incoming |= 0xc0;   // show DFAC lines high
236         break;
237
238      case 2:      // port C
239         if (cuda_controls_power)
240         {
241            incoming |= 0x3;
242         }
243            else
244            {
245                incoming |= 0x3;
246            }
247         break;
248   }
249
250   // apply data direction registers
251   incoming &= (ddrs[offset] ^ 0xff);
252   // add in ddr-masked version of port writes
253   incoming |= (ports[offset] & ddrs[offset]);
254
255   return incoming;
256}
257
258WRITE8_MEMBER( cuda_device::ports_w )
259{
260   send_port(space, offset, data);
261
262   ports[offset] = data;
263}
264
265READ8_MEMBER( cuda_device::pll_r )
266{
267   return pll_ctrl;
268}
269
270WRITE8_MEMBER( cuda_device::pll_w )
271{
272   #ifdef CUDA_SUPER_VERBOSE
273   if (pll_ctrl != data)
274   {
275      static const int clocks[4] = { 524288, 1048576, 2097152, 4194304 };
276      printf("PLL ctrl: clock %d TCS:%d BCS:%d AUTO:%d BWC:%d PLLON:%d\n", clocks[data&3],
277         (data & 0x80) ? 1 : 0,
278         (data & 0x40) ? 1 : 0,
279         (data & 0x20) ? 1 : 0,
280         (data & 0x10) ? 1 : 0,
281         (data & 0x08) ? 1 : 0);
282   }
283   #endif
284   pll_ctrl = data;
285}
286
287READ8_MEMBER( cuda_device::timer_ctrl_r )
288{
289   return timer_ctrl;
290}
291
292WRITE8_MEMBER( cuda_device::timer_ctrl_w )
293{
294//  printf("%02x to timer control\n", data);
295   timer_ctrl = data;
296}
297
298READ8_MEMBER( cuda_device::timer_counter_r )
299{
300   return timer_counter;
301}
302
303WRITE8_MEMBER( cuda_device::timer_counter_w )
304{
305//  printf("%02x to timer/counter\n", data);
306   timer_counter = data;
307}
308
309READ8_MEMBER( cuda_device::onesec_r )
310{
311   return onesec;
312}
313
314WRITE8_MEMBER( cuda_device::onesec_w )
315{
316   static const float rates[4] = { 0.5f, 1.0f, 2.0f, 4.0f };
317
318//  printf("%02x to one-second control\n", data);
319
320   m_timer->adjust(attotime::from_hz(rates[data&3]), 0, attotime::from_hz(rates[data&3]));
321
322   if ((onesec & 0x40) && !(data & 0x40))
323   {
324      device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, CLEAR_LINE);
325   }
326
327   onesec = data;
328}
329
330READ8_MEMBER( cuda_device::pram_r )
331{
332   return pram[offset];
333}
334
335WRITE8_MEMBER( cuda_device::pram_w )
336{
337   pram[offset] = data;
338}
339
340//-------------------------------------------------
341//  cuda_device - constructor
342//-------------------------------------------------
343
344cuda_device::cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
345    : device_t(mconfig, CUDA, "Apple Cuda", tag, owner, clock),
346   device_nvram_interface(mconfig, *this),
347   m_maincpu(*this, CUDA_CPU_TAG)
348{
349}
350
351//-------------------------------------------------
352//  static_set_type - configuration helper to set
353//  the chip type
354//-------------------------------------------------
355
356void cuda_device::static_set_type(device_t &device, int type)
357{
358   cuda_device &cuda = downcast<cuda_device &>(device);
359   cuda.rom_offset = type;
360}
361
362//-------------------------------------------------
363//  device_start - device-specific startup
364//-------------------------------------------------
365
366void cuda_device::device_start()
367{
368   m_timer = timer_alloc(0, NULL);
369   save_item(NAME(ddrs[0]));
370   save_item(NAME(ddrs[1]));
371   save_item(NAME(ddrs[2]));
372   save_item(NAME(ports[0]));
373   save_item(NAME(ports[1]));
374   save_item(NAME(ports[2]));
375   save_item(NAME(pll_ctrl));
376   save_item(NAME(timer_ctrl));
377   save_item(NAME(timer_counter));
378   save_item(NAME(onesec));
379   save_item(NAME(treq));
380   save_item(NAME(byteack));
381   save_item(NAME(tip));
382   save_item(NAME(via_data));
383   save_item(NAME(via_clock));
384   save_item(NAME(adb_in));
385   save_item(NAME(reset_line));
386   save_item(NAME(pram_loaded));
387   save_item(NAME(pram));
388   save_item(NAME(disk_pram));
389
390   astring tempstring;
391   UINT8 *rom = device().machine().region(device().subtag(tempstring, CUDA_CPU_TAG))->base();
392
393    if (rom)               
394    {
395        memcpy(rom, rom+rom_offset, 0x1100);
396    }
397}
398
399
400//-------------------------------------------------
401//  device_reset - device-specific reset
402//-------------------------------------------------
403
404void cuda_device::device_reset()
405{
406   ddrs[0] = ddrs[1] = ddrs[2] = 0;
407   ports[0] = ports[1] = ports[2] = 0;
408
409   m_timer->adjust(attotime::never);
410
411   cuda_controls_power = false;   // set to hard power control
412   adb_in = true;   // line is pulled up to +5v, so nothing plugged in would read as "1"
413   reset_line = 0;
414    tip = 0;
415    treq = 0;
416    byteack = 0;
417    via_data = 0;
418    via_clock = 0;
419    pll_ctrl = 0;
420    timer_ctrl = 0;
421    timer_counter = 0;
422   last_adb_time = m_maincpu->total_cycles();
423}
424
425void cuda_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
426{
427   onesec |= 0x40;
428
429   if (onesec & 0x10)
430   {
431      device_set_input_line(m_maincpu, M68HC05EG_INT_CPI, ASSERT_LINE);
432   }
433}
434
435// the 6805 program clears PRAM on startup (on h/w it's always running once a battery is inserted)
436// we deal with that by loading pram from disk to a secondary buffer and then slapping it into "live"
437// once the cuda reboots the 68k
438void cuda_device::nvram_default()
439{
440   memset(pram, 0, 0x100);
441   memset(disk_pram, 0, 0x100);
442
443   pram[0x1] = 0x80;
444   pram[0x2] = 0x4f;
445   pram[0x3] = 0x48;
446   pram[0x8] = 0x13;
447   pram[0x9] = 0x88;
448   pram[0xb] = 0x4c;
449   pram[0xc] = 0x4e;
450   pram[0xd] = 0x75;
451   pram[0xe] = 0x4d;
452   pram[0xf] = 0x63;
453   pram[0x10] = 0xa8;
454   pram[0x14] = 0xcc;
455   pram[0x15] = 0x0a;
456   pram[0x16] = 0xcc;
457   pram[0x17] = 0x0a;
458   pram[0x1d] = 0x02;
459   pram[0x17] = 0x63;
460   pram[0x6f] = 0x28;
461   pram[0x70] = 0x83;
462   pram[0x71] = 0x26;
463   pram[0x77] = 0x01;
464   pram[0x78] = 0xff;
465   pram[0x79] = 0xff;
466   pram[0x7a] = 0xff;
467   pram[0x7b] = 0xdf;
468   pram[0x7d] = 0x09;
469   pram[0xf3] = 0x12;
470   pram[0xf9] = 0x01;
471   pram[0xf3] = 0x12;
472   pram[0xfb] = 0x8d;
473   pram_loaded = false;
474}
475
476void cuda_device::nvram_read(emu_file &file)
477{
478   file.read(disk_pram, 0x100);
479   pram_loaded = false;
480}
481
482void cuda_device::nvram_write(emu_file &file)
483{
484   file.write(pram, 0x100);
485}
src/mess/machine/cuda.h
r0r13679
1#pragma once
2
3#ifndef __CUDA_H__
4#define __CUDA_H__
5
6#include "emu.h"
7
8
9
10//**************************************************************************
11//  MACROS / CONSTANTS
12//**************************************************************************
13
14#define CUDA_TAG   "cuda"
15
16#define CUDA_341S0060   0x1100  // v2.40
17#define CUDA_341S0788   0x2200  // v2.37
18
19//**************************************************************************
20//  INTERFACE CONFIGURATION MACROS
21//**************************************************************************
22
23#define MCFG_CUDA_ADD(_type) \
24    MCFG_DEVICE_ADD(CUDA_TAG, CUDA, 0) \
25    MCFG_CUDA_TYPE(_type)
26
27#define MCFG_CUDA_REPLACE(_type) \
28    MCFG_DEVICE_REPLACE(CUDA_TAG, CUDA, 0) \
29    MCFG_CUDA_TYPE(_type)
30
31#define MCFG_CUDA_TYPE(_type) \
32    cuda_device::static_set_type(*device, _type);
33
34//**************************************************************************
35//  TYPE DEFINITIONS
36//**************************************************************************
37
38// ======================> cuda_device
39
40class cuda_device :  public device_t, public device_nvram_interface
41{
42public:
43    // construction/destruction
44    cuda_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
45
46    // inline configuration helpers
47    static void static_set_type(device_t &device, int type);
48
49    // device_config_nvram_interface overrides
50    virtual void nvram_default();
51    virtual void nvram_read(emu_file &file);
52    virtual void nvram_write(emu_file &file);
53
54    DECLARE_READ8_MEMBER( ddr_r );
55    DECLARE_WRITE8_MEMBER( ddr_w );
56    DECLARE_READ8_MEMBER( ports_r );
57    DECLARE_WRITE8_MEMBER( ports_w );
58    DECLARE_READ8_MEMBER( pll_r );
59    DECLARE_WRITE8_MEMBER( pll_w );
60    DECLARE_READ8_MEMBER( timer_ctrl_r );
61    DECLARE_WRITE8_MEMBER( timer_ctrl_w );
62    DECLARE_READ8_MEMBER( timer_counter_r );
63    DECLARE_WRITE8_MEMBER( timer_counter_w );
64    DECLARE_READ8_MEMBER( onesec_r );
65    DECLARE_WRITE8_MEMBER( onesec_w );
66    DECLARE_READ8_MEMBER( pram_r );
67    DECLARE_WRITE8_MEMBER( pram_w );
68
69    // VIA interface routines
70    UINT8 get_treq() { return treq; }
71    void set_tip(UINT8 val) { tip = val; }
72    void set_byteack(UINT8 val) { byteack = val; }
73    UINT8 get_via_data() { return via_data; }
74    void set_via_data(UINT8 dat) { via_data = dat; printf("68K-> VIA_DATA: %d\n", dat); }
75    UINT8 get_via_clock() { return via_clock; }
76
77    int rom_offset;
78
79protected:
80    // device-level overrides
81    virtual void device_start();
82    virtual void device_reset();
83    virtual void device_config_complete() { m_shortname = "cuda"; }
84    virtual machine_config_constructor device_mconfig_additions() const;
85    virtual const rom_entry *device_rom_region() const;
86
87    required_device<cpu_device> m_maincpu;
88
89    virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
90
91private:
92    UINT8 ddrs[3];
93    UINT8 ports[3];
94    UINT8 pll_ctrl;
95    UINT8 timer_ctrl;
96    UINT8 timer_counter;
97    UINT8 onesec;
98    UINT8 treq, byteack, tip, via_data, via_clock, last_adb;
99    UINT64 last_adb_time;
100    bool cuda_controls_power;
101    bool adb_in;
102    int reset_line;
103    emu_timer *m_timer;
104    UINT8 pram[0x100], disk_pram[0x100];
105    bool pram_loaded;
106
107    void send_port(address_space &space, UINT8 offset, UINT8 data);
108};
109
110// device type definition
111extern const device_type CUDA;
112
113#endif
src/mess/machine/mac.c
r13678r13679
6868     344S0100 - 0x0100 (1.00) - Some (early production?) IIsi
6969
7070     Cuda version spotting:
71     341S0060 - 0x00020028 (2.40) - Performa/Quadra 6xx, PMac 6200, x400, some x500, Pippin, Gossamer G3, others?
72                                    (verified found in PMac 5500-225)
71     341S0060 - 0x00020028 (2.40) - Performa/Quadra 6xx, PMac 6200, x400, some x500, Pippin, "Gossamer" G3, others?
72                                    (verified found in PMac 5500-225, G3-333)
7373     341S0262 - 0x???????? (?.??) - some PMac 6500
7474     341S0285 - 0x???????? (?.??) - PMac 4400 + Mac clones
7575     341S0417 - 0x???????? (?.??) - Color Classic
r13678r13679
12091209      printf("68K: Read VIA_DATA %x\n", ret);
12101210      #endif
12111211    }
1212   else if (ADB_IS_CUDA)
1213   {
1214        ret = mac->m_cuda->get_via_data();
1215      #if LOG_ADB
1216      printf("68K: Read VIA_DATA %x\n", ret);
1217      #endif
1218   }
12121219    else
12131220    {
12141221        ret = (mac->m_adb_send & 0x80)>>7;
r13678r13679
12291236    {
12301237        mac->m_egret->set_via_data(data & 1);
12311238    }
1239    else if (ADB_IS_CUDA)
1240    {
1241        mac->m_cuda->set_via_data(data & 1);
1242    }
12321243    else
12331244    {
12341245        mac->m_adb_command <<= 1;
r13678r13679
12991310      case MODEL_MAC_SE30:
13001311         return 0x81 | PA6;
13011312
1302      case MODEL_MAC_LC:      // apollo board is 0x38, box 0x11 (17), vid hw 0x21
1313      case MODEL_MAC_LC:
13031314      case MODEL_MAC_LC_II:
13041315      case MODEL_MAC_IIVX:
13051316         return 0x81 | PA6 | PA4 | PA2;
r13678r13679
13691380        {
13701381            val |= mac->m_egret->get_xcvr_session()<<3;
13711382      }
1383      else if (ADB_IS_CUDA)
1384        {
1385            val |= mac->m_cuda->get_treq()<<3;
1386      }
13721387      else
13731388      {
13741389         if (mac->m_mouse_bit_y)   /* Mouse Y2 */
r13678r13679
15451560        mac->m_egret->set_via_full((data&0x10) ? 1 : 0);
15461561        mac->m_egret->set_sys_session((data&0x20) ? 1 : 0);
15471562   }
1563   else if (ADB_IS_CUDA)
1564   {
1565      #if LOG_ADB
1566      printf("68K: New Cuda state: TIP %d BYTEACK %d (PC %x)\n", (data>>5)&1, (data>>4)&1, cpu_get_pc(mac->m_maincpu));
1567      #endif
1568        mac->m_cuda->set_byteack((data&0x10) ? 1 : 0);
1569        mac->m_cuda->set_tip((data&0x20) ? 1 : 0);
1570   }
15481571}
15491572
15501573static void mac_via_irq(device_t *device, int state)
src/mess/includes/mac.h
r13678r13679
1313#include "machine/6522via.h"
1414#include "machine/ram.h"
1515#include "machine/egret.h"
16#include "machine/cuda.h"
1617#include "machine/nubus.h"
1718#include "machine/ncr539x.h"
1819#include "sound/asc.h"
r13678r13679
2627#define ADB_IS_BITBANG   ((mac->m_model == MODEL_MAC_SE || mac->m_model == MODEL_MAC_CLASSIC) || (mac->m_model >= MODEL_MAC_II && mac->m_model <= MODEL_MAC_IICI) || (mac->m_model == MODEL_MAC_SE30) || (mac->m_model == MODEL_MAC_QUADRA_700))
2728#define ADB_IS_BITBANG_CLASS   ((m_model == MODEL_MAC_SE || m_model == MODEL_MAC_CLASSIC) || (m_model >= MODEL_MAC_II && m_model <= MODEL_MAC_IICI) || (m_model == MODEL_MAC_SE30) || (m_model == MODEL_MAC_QUADRA_700))
2829#define ADB_IS_EGRET   (mac->m_model >= MODEL_MAC_LC && mac->m_model <= MODEL_MAC_CLASSIC_II) || ((mac->m_model >= MODEL_MAC_IISI) && (mac->m_model <= MODEL_MAC_IIVI))
30#define ADB_IS_CUDA       ((mac->m_model >= MODEL_MAC_TV && mac->m_model <= MODEL_MAC_COLOR_CLASSIC) || ((mac->m_model >= MODEL_MAC_QUADRA_660AV) && (mac->m_model <= MODEL_MAC_QUADRA_630)) || (mac->m_model >= MODEL_MAC_POWERMAC_6100))
2931#define ADB_IS_PM_VIA1   (mac->m_model >= MODEL_MAC_PORTABLE && mac->m_model <= MODEL_MAC_PB100)
3032#define ADB_IS_PM_VIA2   (mac->m_model >= MODEL_MAC_PB140 && mac->m_model <= MODEL_MAC_PBDUO_270c)
3133#define ADB_IS_PM_VIA1_CLASS   (m_model >= MODEL_MAC_PORTABLE && m_model <= MODEL_MAC_PB100)
r13678r13679
9395   MODEL_MAC_PBDUO_270c,
9496
9597   MODEL_MAC_QUADRA_700,   // 68(LC)040 desktops
98   MODEL_MAC_QUADRA_610,
99   MODEL_MAC_QUADRA_650,
100    MODEL_MAC_QUADRA_800,
96101   MODEL_MAC_QUADRA_900,
97102   MODEL_MAC_QUADRA_950,
98103   MODEL_MAC_QUADRA_660AV,
99104   MODEL_MAC_QUADRA_840AV,
100105   MODEL_MAC_QUADRA_605,
101   MODEL_MAC_QUADRA_610,
102106   MODEL_MAC_QUADRA_630,
103   MODEL_MAC_QUADRA_650,
104    MODEL_MAC_QUADRA_800,
105107
106108   MODEL_MAC_PB550c,   // 68(LC)040 PowerBooks
107109   MODEL_MAC_PB520,
r13678r13679
214216      m_via2(*this, "via6522_1"),
215217      m_asc(*this, "asc"),
216218        m_awacs(*this, "awacs"),
217        m_egret(*this, "egret"),
219        m_egret(*this, EGRET_TAG),
220        m_cuda(*this, CUDA_TAG),
218221      m_ram(*this, RAM_TAG),
219222        m_screen(*this, MAC_SCREEN_NAME),
220223        m_539x_1(*this, MAC_539X_1_TAG),
r13678r13679
227230   optional_device<asc_device> m_asc;
228231   optional_device<awacs_device> m_awacs;
229232    optional_device<egret_device> m_egret;
233    optional_device<cuda_device> m_cuda;
230234   required_device<ram_device> m_ram;
231235    optional_device<screen_device> m_screen;
232236    optional_device<ncr539x_device> m_539x_1;
src/mess/mess_dev.lst
r13678r13679
8181S100_DJDMA
8282S100_MM65K16S
8383EGRET
84CUDA
8485ECB_GRIP21
8586HD61830
8687INTERPOD
src/mess/mess.mak
r13678r13679
633633   $(MESS_MACHINE)/apple3.o   \
634634   $(MESS_DRIVERS)/apple3.o   \
635635   $(MESS_MACHINE)/egret.o     \
636   $(MESS_MACHINE)/cuda.o      \
636637   $(MESS_VIDEO)/nubus_48gc.o   \
637638   $(MESS_VIDEO)/nubus_cb264.o \
638639   $(MESS_VIDEO)/nubus_vikbw.o \
r13678r13679
18421843            $(MESSSRC)/machine/nes_unif.c \
18431844
18441845$(MESS_AUDIO)/mac.o:      $(MESSSRC)/audio/mac.c \
1845            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h
1846            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h $(MESSSRC)/machine/cuda.h
18461847
18471848$(MESS_VIDEO)/mac.o:      $(MESSSRC)/video/mac.c \
1848            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h
1849            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h $(MESSSRC)/machine/cuda.h
18491850
18501851$(MESS_MACHINE)/mac.o:      $(MESSSRC)/machine/mac.c \
1851            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h
1852            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h $(MESSSRC)/machine/cuda.h
18521853
1854$(MESS_MACHINE)/macadb.o:   $(MESSSRC)/machine/macadb.c \
1855            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h $(MESSSRC)/machine/cuda.h
1856
1857$(MESS_MACHINE)/macrtc.o:   $(MESSSRC)/machine/macrtc.c \
1858            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h $(MESSSRC)/machine/cuda.h
1859
18531860$(MESS_DRIVERS)/mac.o:      $(MESSSRC)/drivers/mac.c \
1854            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h
1861            $(MESSSRC)/includes/mac.h $(MESSSRC)/machine/egret.h $(MESSSRC)/machine/cuda.h
18551862
18561863$(MESS_MACHINE)/egret.o:   $(MESSSRC)/machine/egret.c\
18571864                           $(MESSSRC)/machine/egret.h
src/mess/drivers/mac.c
r13678r13679
219219      m_rbv_ifr = ifr | 0x80;
220220
221221//      printf("VIA2 raise\n");
222      this->set_via2_interrupt(1);
222      set_via2_interrupt(1);
223223   }
224224   else
225225   {
226226//      printf("VIA2 lower\n");
227      this->set_via2_interrupt(0);
227      set_via2_interrupt(0);
228228   }
229229}
230230
r13678r13679
11731173   MCFG_RAM_EXTRA_OPTIONS("6M,8M,10M")
11741174MACHINE_CONFIG_END
11751175
1176static MACHINE_CONFIG_DERIVED( maccclas, maclc )
1177
1178   MCFG_CPU_REPLACE("maincpu", M68030, C15M)
1179   MCFG_CPU_PROGRAM_MAP(maclc_map)
1180   MCFG_CPU_VBLANK_INT(MAC_SCREEN_NAME, mac_rbv_vbl)
1181
1182   MCFG_RAM_MODIFY(RAM_TAG)
1183   MCFG_RAM_DEFAULT_SIZE("4M")
1184   MCFG_RAM_EXTRA_OPTIONS("6M,8M,10M")
1185   
1186    MCFG_EGRET_REMOVE()
1187    MCFG_CUDA_ADD(CUDA_341S0788)    // should be 341s0417, but only the color classic used that rev and those are "collectable" ($$$$)
1188    MCFG_QUANTUM_PERFECT_CPU("maincpu")
1189MACHINE_CONFIG_END
1190
11761191static MACHINE_CONFIG_DERIVED( maclc3, maclc )
11771192
11781193   MCFG_CPU_REPLACE("maincpu", M68030, 25000000)
r13678r13679
15561571   MCFG_RAM_MODIFY(RAM_TAG)
15571572   MCFG_RAM_DEFAULT_SIZE("2M")
15581573   MCFG_RAM_EXTRA_OPTIONS("4M,8M,16M,32M,48M,64M,128M")
1574
15591575    MCFG_EGRET_ADD(EGRET_TYPE_100)
15601576   MCFG_QUANTUM_PERFECT_CPU("maincpu")
15611577MACHINE_CONFIG_END
r13678r13679
21592175COMP( 1992, macpb180, macpb160, 0,  macpb180, macadb,   macpb160,     "Apple Computer", "Macintosh PowerBook 180", GAME_NOT_WORKING )
21602176COMP( 1992, macpb180c,macpb160, 0,  macpb180c,macadb,   macpb160,     "Apple Computer", "Macintosh PowerBook 180c", GAME_NOT_WORKING )
21612177//COMP( 1992, macpd210, 0,        0,  macpd210, macadb,   macpd210,     "Apple Computer", "Macintosh PowerBook Duo 210", GAME_NOT_WORKING )
2162COMP( 1993, maccclas, 0,        0,  maclc2,  macadb,   maclrcclassic,"Apple Computer", "Macintosh Color Classic", GAME_NOT_WORKING )
2178COMP( 1993, maccclas, 0,        0,  maccclas, macadb,   maclrcclassic,"Apple Computer", "Macintosh Color Classic", GAME_NOT_WORKING )
21632179COMP( 1992, macpb145b,macpb140, 0,  macpb170, macadb,   macpb140,     "Apple Computer", "Macintosh PowerBook 145B", GAME_NOT_WORKING )
21642180COMP( 1993, maclc3,   0,      0,   maclc3,   maciici,  maclc3,         "Apple Computer", "Macintosh LC III",  GAME_NOT_WORKING )
21652181COMP( 1993, maciivx,  0,      0,   maciivx,  maciici,  maciivx,     "Apple Computer", "Macintosh IIvx",  GAME_NOT_WORKING )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team