Previous 199869 Revisions Next

r18510 Sunday 14th October, 2012 at 01:28:42 UTC by R. Belmont
(MESS) Mac updates: [R. Belmont]
- Line-level ADB comms for machines using the Egret ADB MCU, including standard transactions and SRQ
- Built-in video support for all modes on machines with the V8 and Sonora ASICs
- Corrected some minor bugs in the ADB protocol spoken by the keyboard simulation

New systems added or promoted from NOT_WORKING status
-----------------------------------------------------
Macintosh LC [R. Belmont]
Macintosh IIsi [R. Belmont]
Macintosh LC II [R. Belmont]
Macintosh Classic II [R. Belmont]
Macintosh LC III [R. Belmont]
Macintosh IIvx [R. Belmont]
Macintosh IIvi [R. Belmont]
[src/mess/drivers]mac.c
[src/mess/includes]mac.h
[src/mess/machine]cuda.c cuda.h egret.c egret.h mac.c macadb.c
[src/mess/video]mac.c

trunk/src/mess/machine/cuda.c
r18509r18510
4141#include "cpu/m6805/m6805.h"
4242#include "machine/6522via.h"
4343#include "sound/asc.h"
44#include "includes/mac.h"
4445
4546//**************************************************************************
4647//  MACROS / CONSTANTS
r18509r18510
122123         {
123124/*                if (data & 0x80)
124125                {
125                    printf("CU ADB: 1->0 time %lld\n", m_maincpu->total_cycles()-last_adb_time);
126                    printf("CU ADB: 1->0 time %lld\n", machine().time().as_ticks(1000000) - last_adb_time);
126127                }
127128                else
128129                {
129                    printf("CU ADB: 0->1 time %lld\n", m_maincpu->total_cycles()-last_adb_time);
130                }                      */
130                    printf("CU ADB: 0->1 time %lld\n", machine().time().as_ticks(1000000) - last_adb_time);
131                }*/
132
133                adb_in = (data & 0x80) ? true : false;
134
135            mac_state *mac = machine().driver_data<mac_state>();
136            mac->adb_linechange(((data & 0x80) >> 7) ^ 1, (int)(machine().time().as_ticks(1000000) - last_adb_time));
137
131138            last_adb = data & 0x80;
132            last_adb_time = m_maincpu->total_cycles();
139            last_adb_time = machine().time().as_ticks(1000000);
133140         }
134141         break;
135142
r18509r18510
207214   switch (offset)
208215   {
209216      case 0:    // port A
210//          incoming |= adb_in ? 0x40 : 0;
211
212217         if (cuda_controls_power)
213218         {
214219            incoming = 0x20; // pull up + chassis switch (which is 0 = on)
r18509r18510
217222         {
218223            incoming = 0x02 | 0x01;   // pull-up + PFW
219224         }
225
226            if (adb_in)
227            {
228                incoming |= 0x40;
229            }
220230         break;
221231
222232        case 1:      // port B
trunk/src/mess/machine/cuda.h
r18509r18510
8484    UINT8 get_via_data() { return via_data; }
8585    void set_via_data(UINT8 dat) { via_data = dat; }
8686    UINT8 get_via_clock() { return via_clock; }
87    void set_adb_line(int linestate) { adb_in = (linestate == ASSERT_LINE) ? true : false; }
8788
8889    int rom_offset;
8990
trunk/src/mess/machine/mac.c
r18509r18510
18861886   }
18871887
18881888   m_scsi_interrupt = 0;
1889   if (machine().device<cpu_device>("maincpu")->debug())
1889   if ((machine().device<cpu_device>("maincpu")->debug()) && (m_model < MODEL_MAC_POWERMAC_6100))
18901890   {
18911891      machine().device<cpu_device>("maincpu")->debug()->set_dasm_override(mac_dasm_override);
18921892   }
trunk/src/mess/machine/egret.c
r18509r18510
120120         {
121121/*                if (data & 0x80)
122122                {
123                    printf("EG ADB: 1->0 time %lld\n", m_maincpu->total_cycles()-last_adb_time);
123                    printf("EG ADB: 1->0 time %lld\n", machine().time().as_ticks(1000000) - last_adb_time);
124124                }
125125                else
126126                {
127                    printf("EG ADB: 0->1 time %lld\n", m_maincpu->total_cycles()-last_adb_time);
127                    printf("EG ADB: 0->1 time %lld\n", machine().time().as_ticks(1000000) - last_adb_time);
128128                }*/
129
130            // allow the linechange handler to override us
131                adb_in = (data & 0x80) ? true : false;
132
133            mac_state *mac = machine().driver_data<mac_state>();
134            mac->adb_linechange(((data & 0x80) >> 7) ^ 1, (int)(machine().time().as_ticks(1000000) - last_adb_time));
135
129136            last_adb = data & 0x80;
130            last_adb_time = m_maincpu->total_cycles();
131                adb_in = (data & 0x80) ? true : false;
137            last_adb_time = machine().time().as_ticks(1000000);
132138         }
133139         break;
134140
r18509r18510
212218   switch (offset)
213219   {
214220      case 0:    // port A
215          incoming |= adb_in ? 0x40 : 0;
221         incoming |= adb_in ? 0x40 : 0;
216222
217223         if (egret_controls_power)
218224         {
trunk/src/mess/machine/egret.h
r18509r18510
7777    UINT8 get_via_data() { return via_data; }
7878    void set_via_data(UINT8 dat) { via_data = dat; }
7979    UINT8 get_via_clock() { return via_clock; }
80    void set_adb_line(int linestate) { adb_in = (linestate == ASSERT_LINE) ? true : false; }
8081
8182    int rom_offset;
8283
trunk/src/mess/machine/macadb.c
r18509r18510
11/***************************************************************************
22
33  macadb.c - handles various aspects of ADB on the Mac.
4
4
55***************************************************************************/
66
77#include "emu.h"
r18509r18510
2222#define ADB_CMD_RESET      (0)
2323#define ADB_CMD_FLUSH      (1)
2424
25// ADB line states
26enum
27{
28    // receive states
29    LST_IDLE = 0,
30    LST_ATTENTION,
31    LST_BIT0,
32    LST_BIT1,
33    LST_BIT2,
34    LST_BIT3,
35    LST_BIT4,
36    LST_BIT5,
37    LST_BIT6,
38    LST_BIT7,
39    LST_TSTOP,
40    LST_WAITT1T,
41    LST_RCVSTARTBIT,
42    LST_SRQNODATA,
43
44    // send states
45    LST_TSTOPSTART,
46    LST_TSTOPSTARTa,
47    LST_STARTBIT,
48    LST_SENDBIT0,
49    LST_SENDBIT0a,
50    LST_SENDBIT1,
51    LST_SENDBIT1a,
52    LST_SENDBIT2,
53    LST_SENDBIT2a,
54    LST_SENDBIT3,
55    LST_SENDBIT3a,
56    LST_SENDBIT4,
57    LST_SENDBIT4a,
58    LST_SENDBIT5,
59    LST_SENDBIT5a,
60    LST_SENDBIT6,
61    LST_SENDBIT6a,
62    LST_SENDBIT7,
63    LST_SENDBIT7a,
64    LST_SENDSTOP,
65    LST_SENDSTOPa
66};
67
2568/* *************************************************************************
26 * ADB (Mac II-style)
69 * High-level ADB primitives used by all lower-level implementations
2770 * *************************************************************************/
2871
2972#if LOG_ADB
r18509r18510
264307            break;
265308
266309         case 2:   // listen
267            #if LOG_ADB || LOG_ADB_TALK_LISTEN
268            printf("ADB LISTEN: reg %x address %x\n", reg, addr);
269            #endif
270
271            m_adb_direction = 1;   // input from Mac
272            m_adb_listenreg = reg;
273            m_adb_listenaddr = addr;
274            m_adb_command = 0;
310                m_adb_datasize = 0;
311                if ((addr == m_adb_keybaddr) || (addr == m_adb_mouseaddr))
312                {
313                #if LOG_ADB || LOG_ADB_TALK_LISTEN
314                    printf("ADB LISTEN: reg %x address %x\n", reg, addr);
315                #endif
316                    m_adb_direction = 1;   // input from Mac
317                    m_adb_command = 0;
318                    m_adb_listenreg = reg;
319                    m_adb_listenaddr = addr;
320                    if ((ADB_IS_EGRET) || (ADB_IS_CUDA))
321                    {
322                        m_adb_stream_ptr = 0;
323                        memset(m_adb_buffer, 0, sizeof(m_adb_buffer));
324                    }
325                }
326                else
327                {
328                   #if LOG_ADB || LOG_ADB_TALK_LISTEN
329                    printf("ADB LISTEN to unknown device, timing out\n");
330                    #endif
331                    m_adb_direction = 0;
332                }
275333            break;
276334
277335         case 3: // talk
278336            #if LOG_ADB || LOG_ADB_TALK_LISTEN
279            printf("ADB TALK: reg %x address %x\n", reg, addr);
337            printf("ADB TALK: reg %x address %x (K %x M %x)\n", reg, addr, m_adb_keybaddr, m_adb_mouseaddr);
280338            #endif
281339
282340            // keep track of what device the Mac last TALKed to
r18509r18510
312370
313371                  // get ID/handler
314372                  case 3:
315                     m_adb_buffer[0] = 0x60 | ((m_adb_mouseaddr<<8)&0xf);   // SRQ enable, no exceptional event
373                     m_adb_buffer[0] = 0x60 | (m_adb_mouseaddr&0xf);   // SRQ enable, no exceptional event
316374                     m_adb_buffer[1] = 0x01;   // handler 1
317375                     m_adb_datasize = 2;
318376
r18509r18510
322380                  default:
323381                     break;
324382               }
383
384                    if (adb_pollkbd(0))
385                    {
386                        m_adb_srqflag = true;
387                    }
325388            }
326389            else if (addr == m_adb_keybaddr)
327390            {
r18509r18510
341404                     {
342405                        this->adb_pollkbd(1);
343406                     }
344//                          printf("keyboard = %02x %02x\n", m_adb_currentkeys[0], m_adb_currentkeys[1]);
407
408/*                            if (m_adb_currentkeys[0] != 0xff)
409                            {
410                                printf("Keys[0] = %02x\n", m_adb_currentkeys[0]);
411                            }
412                            if (m_adb_currentkeys[1] != 0xff)
413                            {
414                                printf("Keys[1] = %02x\n", m_adb_currentkeys[1]);
415                            }*/
416
345417                     m_adb_buffer[0] = m_adb_currentkeys[1];
346418                     m_adb_buffer[1] = m_adb_currentkeys[0];
347419                     m_adb_datasize = 2;
348420                     break;
349421
350422                  // read modifier keys
351                  case 2:
352                     this->adb_pollkbd(1);
353                     m_adb_buffer[0] = m_adb_modifiers;   // nothing pressed
354                     m_adb_buffer[1] = 0;
355                     m_adb_datasize = 2;
423                        case 2:
424                            {
425                                this->adb_pollkbd(1);
426                                m_adb_buffer[0] = m_adb_modifiers;
427                                m_adb_buffer[1] = 0xff;
428                                m_adb_datasize = 2;
429                            }
356430                     break;
357431
358432                  // get ID/handler
359433                  case 3:
360                     m_adb_buffer[0] = 0x60 | ((m_adb_keybaddr<<8)&0xf);   // SRQ enable, no exceptional event
434                     m_adb_buffer[0] = 0x60 | (m_adb_keybaddr&0xf);   // SRQ enable, no exceptional event
361435                     m_adb_buffer[1] = 0x01;   // handler 1
362436                     m_adb_datasize = 2;
363437
r18509r18510
367441                  default:
368442                     break;
369443               }
444
445                    if (adb_pollmouse())
446                    {
447                        m_adb_srqflag = true;
448                    }
370449            }
371450            else
372451            {
r18509r18510
375454               #endif
376455               m_adb_buffer[0] = m_adb_buffer[1] = 0;
377456               m_adb_datasize = 0;
457
458                    if ((adb_pollkbd(0)) || (adb_pollmouse()))
459                    {
460                        m_adb_srqflag = true;
461                    }
378462            }
379463            break;
380464      }
r18509r18510
384468   else
385469   {
386470      #if LOG_ADB || LOG_ADB_TALK_LISTEN
387      printf("Got LISTEN data %x for device %x reg %x\n", m_adb_command, m_adb_listenaddr, m_adb_listenreg);
471      printf("Got LISTEN data %02x %02x for device %x reg %x\n", m_adb_command, m_adb_buffer[1], m_adb_listenaddr, m_adb_listenreg);
388472      #endif
389473
474        m_adb_direction = 0;
475
390476      if (m_adb_listenaddr == m_adb_mouseaddr)
391477      {
392478         if ((m_adb_listenreg == 3) && (m_adb_command > 0) && (m_adb_command < 16))
r18509r18510
414500{
415501   mac_state *mac = machine.driver_data<mac_state>();
416502
417   // do one clock transition on CB1 to advance the VIA shifter
418   mac->m_adb_extclock ^= 1;
419   mac->m_via1->write_cb1(mac->m_adb_extclock);
420   mac->m_adb_extclock ^= 1;
421   mac->m_via1->write_cb1(mac->m_adb_extclock);
503    if ((ADB_IS_EGRET_NONCLASS) || (ADB_IS_CUDA_NONCLASS))
504    {
505        switch (mac->m_adb_linestate)
506        {
507            case LST_SRQNODATA:
508                mac->set_adb_line(ASSERT_LINE);
509                mac->m_adb_linestate = LST_IDLE;
510                break;
422511
423   mac->m_adb_timer_ticks--;
424   if (!mac->m_adb_timer_ticks)
425   {
426      mac->m_adb_timer->adjust(attotime::never);
512            case LST_TSTOPSTART:
513                mac->set_adb_line(ASSERT_LINE);
514                mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000));
515                mac->m_adb_linestate++;
516                break;
427517
428      if ((mac->m_adb_direction) && (ADB_IS_BITBANG))
429      {
430         mac->adb_talk();
431      }
432   }
433   else
434   {
435      mac->m_adb_timer->adjust(attotime(0, ATTOSECONDS_IN_USEC(200)));
436   }
518            case LST_TSTOPSTARTa:
519                mac->set_adb_line(CLEAR_LINE);
520                mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000));
521                mac->m_adb_linestate++;
522                break;
523
524            case LST_STARTBIT:
525                mac->set_adb_line(ASSERT_LINE);
526                mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000));
527                mac->m_adb_linestate++;
528                break;
529
530            case LST_SENDBIT0:
531            case LST_SENDBIT1:
532            case LST_SENDBIT2:
533            case LST_SENDBIT3:
534            case LST_SENDBIT4:
535            case LST_SENDBIT5:
536            case LST_SENDBIT6:
537            case LST_SENDBIT7:
538                mac->set_adb_line(CLEAR_LINE);
539                if (mac->m_adb_buffer[mac->m_adb_stream_ptr] & 0x80)
540                {
541//                    printf("1 ");
542                    mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000));
543                }
544                else
545                {
546//                    printf("0 ");
547                    mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000));
548                }
549                mac->m_adb_linestate++;
550                break;
551
552            case LST_SENDBIT0a:
553            case LST_SENDBIT1a:
554            case LST_SENDBIT2a:
555            case LST_SENDBIT3a:
556            case LST_SENDBIT4a:
557            case LST_SENDBIT5a:
558            case LST_SENDBIT6a:
559                mac->set_adb_line(ASSERT_LINE);
560                if (mac->m_adb_buffer[mac->m_adb_stream_ptr] & 0x80)
561                {
562                    mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000));
563                }
564                else
565                {
566                    mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000));
567                }
568                mac->m_adb_buffer[mac->m_adb_stream_ptr] <<= 1;
569                mac->m_adb_linestate++;
570                break;
571
572            case LST_SENDBIT7a:
573                mac->set_adb_line(ASSERT_LINE);
574                if (mac->m_adb_buffer[mac->m_adb_stream_ptr] & 0x80)
575                {
576//                    printf("  ");
577                    mac->m_adb_timer->adjust(attotime::from_ticks(105, 1000000));
578                }
579                else
580                {
581//                    printf("  ");
582                    mac->m_adb_timer->adjust(attotime::from_ticks(57, 1000000));
583                }
584
585                mac->m_adb_stream_ptr++;
586                if (mac->m_adb_stream_ptr == mac->m_adb_datasize)
587                {
588                    mac->m_adb_linestate++;
589                }
590                else
591                {
592                    mac->m_adb_linestate = LST_SENDBIT0;
593                }
594                break;
595
596            case LST_SENDSTOP:
597                mac->set_adb_line(CLEAR_LINE);
598                mac->m_adb_timer->adjust(attotime::from_ticks((57*2), 1000000));
599                mac->m_adb_linestate++;
600                break;
601
602            case LST_SENDSTOPa:
603                mac->set_adb_line(ASSERT_LINE);
604                mac->m_adb_timer->adjust(attotime::never);
605                mac->m_adb_linestate = LST_IDLE;
606                break;
607        }
608    }
609    else
610    {
611        // do one clock transition on CB1 to advance the VIA shifter
612        mac->m_adb_extclock ^= 1;
613        mac->m_via1->write_cb1(mac->m_adb_extclock);
614        mac->m_adb_extclock ^= 1;
615        mac->m_via1->write_cb1(mac->m_adb_extclock);
616
617        mac->m_adb_timer_ticks--;
618        if (!mac->m_adb_timer_ticks)
619        {
620            mac->m_adb_timer->adjust(attotime::never);
621
622            if ((mac->m_adb_direction) && (ADB_IS_BITBANG))
623            {
624                mac->adb_talk();
625            }
626        }
627        else
628        {
629            mac->m_adb_timer->adjust(attotime(0, ATTOSECONDS_IN_USEC(200)));
630        }
631    }
437632}
438633
439634void mac_state::mac_adb_newaction(int state)
r18509r18510
9601155   m_adb_waiting_cmd = 0;
9611156   m_adb_streaming = MCU_STREAMING_NONE;
9621157   m_adb_state = 0;
1158    m_adb_srqflag = false;
9631159   m_pmu_poll = 0;
9641160   if (ADB_IS_BITBANG_CLASS)
9651161   {
r18509r18510
9691165   m_adb_datasize = 0;
9701166   m_adb_last_talk = -1;
9711167
1168    m_adb_linestate = 0;
1169
9721170   // mouse
9731171   m_adb_mouseaddr = 3;
9741172   m_adb_lastmousex = m_adb_lastmousey = m_adb_lastbutton = 0;
r18509r18510
9781176   m_adb_keybaddr = 2;
9791177   m_adb_keybinitialized = 0;
9801178   m_adb_currentkeys[0] = m_adb_currentkeys[1] = 0xff;
981   m_adb_modifiers = 0;
1179   m_adb_modifiers = 0xff;
9821180   for (i=0; i<7; i++)
9831181   {
9841182      m_key_matrix[i] = 0;
9851183   }
9861184}
9871185
1186void mac_state::adb_linechange(int state, int dtime)
1187{
1188/*    static const char *states[] =
1189    {
1190        "idle",
1191        "attention",
1192        "bit0",
1193        "bit1",
1194        "bit2",
1195        "bit3",
1196        "bit4",
1197        "bit5",
1198        "bit6",
1199        "bit7",
1200        "tstop",
1201        "waitt1t",
1202        "rcvstartbit",
1203        "srqnodata"
1204    };*/
1205
1206/*    if (m_adb_linestate <= 12)
1207    {
1208        printf("linechange: %d -> %d, time %d (state %d = %s)\n", state^1, state, dtime, m_adb_linestate, states[m_adb_linestate]);
1209    }
1210    else
1211    {
1212        printf("linechange: %d -> %d, time %d (state %d)\n", state^1, state, dtime, m_adb_linestate);
1213    }*/
1214
1215    if ((m_adb_direction) && (m_adb_linestate == LST_TSTOP))
1216    {
1217        if (m_adb_stream_ptr & 1)   // odd byte, can't end here
1218        {
1219//            printf("critical linechange: odd, cont\n");
1220            m_adb_linestate = LST_BIT0;
1221        }
1222        else
1223        {
1224            if (dtime < 90)
1225            {
1226//                printf("critical linechange: even, and it's another bit\n");
1227                m_adb_linestate = LST_BIT0;
1228            }
1229        }
1230    }
1231
1232    switch (m_adb_linestate)
1233    {
1234        case LST_IDLE:
1235            if ((state) && (dtime >= 4500))     // reset
1236            {
1237//                printf("ADB RESET\n");
1238            }
1239            else if ((state) && (dtime >= 1200))    // attention
1240            {
1241//                printf("ADB ATTENTION\n");
1242                m_adb_waiting_cmd = 1;
1243                m_adb_direction = 0;
1244                m_adb_linestate++;
1245            }
1246            break;
1247
1248        case LST_ATTENTION:
1249            if ((!state) && (dtime >= 90))     // Tsync
1250            {
1251//                printf("ADB Tsync\n");
1252                m_adb_command = 0;
1253                m_adb_linestate++;
1254            }
1255            break;
1256
1257        case LST_BIT0:
1258        case LST_BIT1:
1259        case LST_BIT2:
1260        case LST_BIT3:
1261        case LST_BIT4:
1262        case LST_BIT5:
1263        case LST_BIT6:
1264        case LST_BIT7:
1265            if (!state)
1266            {
1267                if (dtime >= 90)    // "1" bit
1268                {
1269                    m_adb_command |= 1;
1270                }
1271//                printf("ADB bit %d\n", m_adb_command & 1);
1272
1273                if (m_adb_linestate != LST_BIT7)
1274                {
1275                    m_adb_command <<= 1;
1276                }
1277                else
1278                {
1279                    if (m_adb_direction)
1280                    {
1281//                        printf("listen byte[%d] = %02x\n", m_adb_stream_ptr, m_adb_command);
1282                        m_adb_buffer[m_adb_stream_ptr++] = m_adb_command;
1283                        m_adb_command = 0;
1284                    }
1285                }
1286
1287                m_adb_linestate++;
1288            }
1289            break;
1290
1291        case LST_TSTOP:
1292            if (state)
1293            {
1294//                printf("ADB TSTOP, command byte %02x\n", m_adb_command);
1295
1296                if (m_adb_direction)
1297                {
1298                    m_adb_command = m_adb_buffer[0];
1299                }
1300
1301                m_adb_srqflag = false;
1302                adb_talk();
1303
1304                if (!m_adb_srqflag)
1305                {
1306                    set_adb_line(ASSERT_LINE);
1307                }
1308                else
1309                {
1310                    set_adb_line(CLEAR_LINE);
1311                }
1312
1313                if (m_adb_datasize > 0)
1314                {
1315/*                    printf("Device has %d bytes of data: ", m_adb_datasize);
1316                    for (int i = 0; i < m_adb_datasize; i++)
1317                    {
1318                        printf("%02x ", m_adb_buffer[i]);
1319                    }*/
1320                    m_adb_linestate = LST_TSTOPSTART;   // T1t
1321                    m_adb_timer->adjust(attotime::from_ticks(324/4, 1000000));
1322                    m_adb_stream_ptr = 0;
1323                }
1324                else if (m_adb_direction)   // if direction is set, we LISTENed to a valid device
1325                {
1326                    m_adb_linestate = LST_WAITT1T;
1327                }
1328                else    // no valid device targetted, time out
1329                {
1330                    if (m_adb_srqflag)
1331                    {
1332                        m_adb_linestate = LST_SRQNODATA;
1333                        m_adb_timer->adjust(attotime::from_ticks(486, 1000000));   // SRQ time
1334                    }
1335                    else
1336                    {
1337                        m_adb_linestate = LST_IDLE;
1338                    }
1339                }
1340            }
1341            break;
1342
1343        case LST_WAITT1T:
1344            if ((!state) && (dtime >= 300))     // T1t
1345            {
1346//                printf("ADB T1t\n");
1347                m_adb_linestate++;
1348            }
1349            break;
1350
1351        case LST_RCVSTARTBIT:
1352            if ((!state) && (dtime >= 90))       // start
1353            {
1354//                printf("ADB start\n");
1355                m_adb_linestate = LST_BIT0;
1356                m_adb_command = 0;
1357            }
1358            break;
1359    }
1360}
1361
1362void mac_state::set_adb_line(int linestate)
1363{
1364    if (ADB_IS_EGRET)
1365    {
1366        m_egret->set_adb_line(linestate);
1367    }
1368    else if (ADB_IS_CUDA)
1369    {
1370        m_cuda->set_adb_line(linestate);
1371    }
1372}
1373
trunk/src/mess/includes/mac.h
r18509r18510
2929#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))
3030#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))
3131#define ADB_IS_EGRET   (m_model >= MODEL_MAC_LC && m_model <= MODEL_MAC_CLASSIC_II) || ((m_model >= MODEL_MAC_IISI) && (m_model <= MODEL_MAC_IIVI))
32#define ADB_IS_EGRET_NONCLASS   (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))
3233#define ADB_IS_CUDA       ((m_model >= MODEL_MAC_COLOR_CLASSIC && m_model <= MODEL_MAC_LC_580) || ((m_model >= MODEL_MAC_QUADRA_660AV) && (m_model <= MODEL_MAC_QUADRA_630)) || (m_model >= MODEL_MAC_POWERMAC_6100))
34#define ADB_IS_CUDA_NONCLASS       ((mac->m_model >= MODEL_MAC_COLOR_CLASSIC && mac->m_model <= MODEL_MAC_LC_580) || ((mac->m_model >= MODEL_MAC_QUADRA_660AV) && (mac->m_model <= MODEL_MAC_QUADRA_630)) || (mac->m_model >= MODEL_MAC_POWERMAC_6100))
3335#define ADB_IS_PM_VIA1   (m_model >= MODEL_MAC_PORTABLE && m_model <= MODEL_MAC_PB100)
3436#define ADB_IS_PM_VIA2   (m_model >= MODEL_MAC_PB140 && m_model <= MODEL_MAC_PBDUO_270c)
3537#define ADB_IS_PM_VIA1_CLASS   (m_model >= MODEL_MAC_PORTABLE && m_model <= MODEL_MAC_PB100)
r18509r18510
258260   UINT32 m_se30_vbl_enable;
259261   UINT8 m_nubus_irq_state;
260262
263   void adb_linechange(int state, int dtime);
264
261265   /* used to store the reply to most keyboard commands */
262266   int m_keyboard_reply;
263267
r18509r18510
318322   INT32 m_adb_state, m_adb_command, m_adb_send, m_adb_timer_ticks, m_adb_extclock, m_adb_direction;
319323   INT32 m_adb_listenreg, m_adb_listenaddr, m_adb_last_talk, m_adb_srq_switch;
320324   INT32 m_adb_streaming, m_adb_stream_ptr;
325   INT32 m_adb_linestate;
326   bool  m_adb_srqflag;
321327
322328   // Portable/PB100 Power Manager IC comms (chapter 4, "Guide to the Macintosh Family Hardware", second edition)
323329   UINT8 m_pm_data_send, m_pm_data_recv, m_pm_ack, m_pm_req, m_pm_cmd[32], m_pm_out[32], m_pm_dptr, m_pm_sptr, m_pm_slen, m_pm_state;
r18509r18510
364370    void rbv_recalc_irqs();
365371   void pmu_exec();
366372   void mac_adb_newaction(int state);
373   void set_adb_line(int linestate);
367374
368375   DECLARE_READ16_MEMBER ( mac_via_r );
369376   DECLARE_WRITE16_MEMBER ( mac_via_w );
r18509r18510
521528   UINT32 screen_update_macrbv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
522529   UINT32 screen_update_macdafb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
523530   UINT32 screen_update_macrbvvram(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
531   UINT32 screen_update_macv8(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
532   UINT32 screen_update_macsonora(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
524533   UINT32 screen_update_macpbwd(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
525534   INTERRUPT_GEN_MEMBER(mac_rbv_vbl);
526535   TIMER_CALLBACK_MEMBER(kbd_clock);
trunk/src/mess/video/mac.c
r18509r18510
99    Classic)
1010
1111    Also emulates on-board video for systems with the
12    RBV, V8, Sonora, and DAFB chips.
12    RBV, V8, Eagle, Sonora, and DAFB chips.
1313
1414    ----------------------------------------------------------------------
1515    Monitor sense codes
r18509r18510
197197      {
198198         pixels = vram8[(y * 160) + (BYTE4_XOR_BE(x))];
199199
200//          *line++ = (pixels>>4)&0xf;
201//          *line++ = pixels&0xf;
202200            *line++ = ((pixels>>6)&3);
203201            *line++ = ((pixels>>4)&3);
204202            *line++ = ((pixels>>2)&3);
r18509r18510
273271         break;
274272   }
275273
276//      printf("RBV reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
274//    printf("RBV reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
277275   machine().primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
278276   render_target *target = machine().render().first_target();
279277   target->set_view(view);
r18509r18510
284282   rectangle visarea;
285283   int htotal, vtotal;
286284   double framerate;
285   int view = 0;
287286
288287   memset(m_rbv_regs, 0, sizeof(m_rbv_regs));
289288
r18509r18510
308307          htotal = 832;
309308         vtotal = 918;
310309         framerate = 75.0;
310            view = 1;
311311         break;
312312
313313      case 2: // 12" RGB
r18509r18510
328328         break;
329329   }
330330
331//      printf("RBV reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
331//    printf("Sonora reset: monitor is %dx%d @ %f Hz\n", visarea.max_x+1, visarea.max_y+1, framerate);
332332   machine().primary_screen->configure(htotal, vtotal, visarea, HZ_TO_ATTOSECONDS(framerate));
333   render_target *target = machine().render().first_target();
334   target->set_view(view);
333335}
334336
335337VIDEO_START_MEMBER(mac_state,macsonora)
r18509r18510
488490UINT32 mac_state::screen_update_macrbvvram(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
489491{
490492   UINT32 *scanline;
491   int x, y;
492   UINT8 mode = 0;
493   int x, y, hres, vres;
493494
494   switch (m_rbv_type)
495   switch (m_rbv_montype)
495496   {
496      case RBV_TYPE_RBV:
497      case RBV_TYPE_V8:
498         mode = m_rbv_regs[0x10] & 7;
497      case 1:   // 15" portrait display
498         hres = 640;
499         vres = 870;
499500         break;
500501
501      case RBV_TYPE_SONORA:
502         mode = m_sonora_vctl[1] & 7;
502      case 2: // 12" RGB
503         hres = 512;
504         vres = 384;
505         break;
503506
504         // forced blank?
505         if (m_sonora_vctl[0] & 0x80)
506         {
507            return 0;
508         }
507      case 6: // 13" RGB
508      default:
509         hres = 640;
510         vres = 480;
509511         break;
510512   }
511513
512   switch (mode)
514   switch (m_rbv_regs[0x10] & 7)
513515   {
514516      case 0:   // 1bpp
515517      {
516518         UINT8 *vram8 = (UINT8 *)m_vram.target();
517519         UINT8 pixels;
518520
519         if (m_rbv_type == RBV_TYPE_SONORA)
521            for (y = 0; y < vres; y++)
522            {
523                scanline = &bitmap.pix32(y);
524                for (x = 0; x < hres; x+=8)
525                {
526                    pixels = vram8[(y * 0x400) + ((x/8)^3)];
527
528                    *scanline++ = m_rbv_palette[0x7f|(pixels&0x80)];
529                    *scanline++ = m_rbv_palette[0x7f|((pixels<<1)&0x80)];
530                    *scanline++ = m_rbv_palette[0x7f|((pixels<<2)&0x80)];
531                    *scanline++ = m_rbv_palette[0x7f|((pixels<<3)&0x80)];
532                    *scanline++ = m_rbv_palette[0x7f|((pixels<<4)&0x80)];
533                    *scanline++ = m_rbv_palette[0x7f|((pixels<<5)&0x80)];
534                    *scanline++ = m_rbv_palette[0x7f|((pixels<<6)&0x80)];
535                    *scanline++ = m_rbv_palette[0x7f|((pixels<<7)&0x80)];
536                }
537            }
538      }
539      break;
540
541      case 1:   // 2bpp
542      {
543         UINT8 *vram8 = (UINT8 *)m_vram.target();
544         UINT8 pixels;
545
546         for (y = 0; y < vres; y++)
520547         {
521            for (y = 0; y < 480; y++)
548            scanline = &bitmap.pix32(y);
549            for (x = 0; x < hres/4; x++)
522550            {
523               scanline = &bitmap.pix32(y);
524               for (x = 0; x < 640; x+=8)
525               {
526                  pixels = vram8[(y * 80) + ((x/8)^3)];
551               pixels = vram8[(y * (hres/4)) + (BYTE4_XOR_BE(x))];
527552
528                  *scanline++ = m_rbv_palette[0x7f|(pixels&0x80)];
529                  *scanline++ = m_rbv_palette[0x7f|((pixels<<1)&0x80)];
530                  *scanline++ = m_rbv_palette[0x7f|((pixels<<2)&0x80)];
531                  *scanline++ = m_rbv_palette[0x7f|((pixels<<3)&0x80)];
532                  *scanline++ = m_rbv_palette[0x7f|((pixels<<4)&0x80)];
533                  *scanline++ = m_rbv_palette[0x7f|((pixels<<5)&0x80)];
534                  *scanline++ = m_rbv_palette[0x7f|((pixels<<6)&0x80)];
535                  *scanline++ = m_rbv_palette[0x7f|((pixels<<7)&0x80)];
536               }
553               *scanline++ = m_rbv_palette[0xfc|((pixels>>6)&3)];
554               *scanline++ = m_rbv_palette[0xfc|((pixels>>4)&3)];
555               *scanline++ = m_rbv_palette[0xfc|((pixels>>2)&3)];
556               *scanline++ = m_rbv_palette[0xfc|(pixels&3)];
537557            }
538558         }
539         else
559      }
560      break;
561
562      case 2: // 4bpp
563      {
564         UINT8 *vram8 = (UINT8 *)m_vram.target();
565         UINT8 pixels;
566
567         for (y = 0; y < vres; y++)
540568         {
541            for (y = 0; y < 480; y++)
569            scanline = &bitmap.pix32(y);
570
571            for (x = 0; x < hres/2; x++)
542572            {
543               scanline = &bitmap.pix32(y);
544               for (x = 0; x < 640; x+=8)
545               {
546                  pixels = vram8[(y * 0x400) + ((x/8)^3)];
573               pixels = vram8[(y * (hres/2)) + (BYTE4_XOR_BE(x))];
547574
548                  *scanline++ = m_rbv_palette[0x7f|(pixels&0x80)];
549                  *scanline++ = m_rbv_palette[0x7f|((pixels<<1)&0x80)];
550                  *scanline++ = m_rbv_palette[0x7f|((pixels<<2)&0x80)];
551                  *scanline++ = m_rbv_palette[0x7f|((pixels<<3)&0x80)];
552                  *scanline++ = m_rbv_palette[0x7f|((pixels<<4)&0x80)];
553                  *scanline++ = m_rbv_palette[0x7f|((pixels<<5)&0x80)];
554                  *scanline++ = m_rbv_palette[0x7f|((pixels<<6)&0x80)];
555                  *scanline++ = m_rbv_palette[0x7f|((pixels<<7)&0x80)];
556               }
575               *scanline++ = m_rbv_palette[0xf0|(pixels>>4)];
576               *scanline++ = m_rbv_palette[0xf0|(pixels&0xf)];
557577            }
558578         }
559579      }
560580      break;
561581
582      case 3: // 8bpp
583      {
584         UINT8 *vram8 = (UINT8 *)m_vram.target();
585         UINT8 pixels;
586
587            for (y = 0; y < vres; y++)
588            {
589                scanline = &bitmap.pix32(y);
590
591                for (x = 0; x < hres; x++)
592                {
593                    pixels = vram8[(y * 2048) + (BYTE4_XOR_BE(x))];
594                    *scanline++ = m_rbv_palette[pixels];
595                }
596            }
597      }
598   }
599
600   return 0;
601}
602
603UINT32 mac_state::screen_update_macv8(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
604{
605   UINT32 *scanline;
606   int x, y, hres, vres;
607
608   switch (m_rbv_montype)
609   {
610      case 1:   // 15" portrait display
611         hres = 640;
612         vres = 870;
613         break;
614
615      case 2: // 12" RGB
616         hres = 512;
617         vres = 384;
618         break;
619
620      case 6: // 13" RGB
621      default:
622         hres = 640;
623         vres = 480;
624         break;
625   }
626
627   switch (m_rbv_regs[0x10] & 7)
628   {
629      case 0:   // 1bpp
630      {
631         UINT8 *vram8 = (UINT8 *)m_vram.target();
632         UINT8 pixels;
633
634            for (y = 0; y < vres; y++)
635            {
636                scanline = &bitmap.pix32(y);
637                for (x = 0; x < hres; x+=8)
638                {
639                    pixels = vram8[(y * 1024) + ((x/8)^3)];
640
641                    *scanline++ = m_rbv_palette[0x7f|(pixels&0x80)];
642                    *scanline++ = m_rbv_palette[0x7f|((pixels<<1)&0x80)];
643                    *scanline++ = m_rbv_palette[0x7f|((pixels<<2)&0x80)];
644                    *scanline++ = m_rbv_palette[0x7f|((pixels<<3)&0x80)];
645                    *scanline++ = m_rbv_palette[0x7f|((pixels<<4)&0x80)];
646                    *scanline++ = m_rbv_palette[0x7f|((pixels<<5)&0x80)];
647                    *scanline++ = m_rbv_palette[0x7f|((pixels<<6)&0x80)];
648                    *scanline++ = m_rbv_palette[0x7f|((pixels<<7)&0x80)];
649                }
650            }
651      }
652      break;
653
562654      case 1:   // 2bpp
563655      {
564656         UINT8 *vram8 = (UINT8 *)m_vram.target();
565657         UINT8 pixels;
566658
567         for (y = 0; y < 480; y++)
659         for (y = 0; y < vres; y++)
568660         {
569661            scanline = &bitmap.pix32(y);
570            for (x = 0; x < 640/4; x++)
662            for (x = 0; x < hres/4; x++)
571663            {
572               pixels = vram8[(y * 160) + (BYTE4_XOR_BE(x))];
664               pixels = vram8[(y * 1024) + (BYTE4_XOR_BE(x))];
573665
574               *scanline++ = m_rbv_palette[0xfc|((pixels>>6)&3)];
575               *scanline++ = m_rbv_palette[0xfc|((pixels>>4)&3)];
576               *scanline++ = m_rbv_palette[0xfc|((pixels>>2)&3)];
577               *scanline++ = m_rbv_palette[0xfc|(pixels&3)];
666               *scanline++ = m_rbv_palette[0x3f|(pixels&0xc0)];
667               *scanline++ = m_rbv_palette[0x3f|((pixels<<2)&0xc0)];
668               *scanline++ = m_rbv_palette[0x3f|((pixels<<4)&0xc0)];
669               *scanline++ = m_rbv_palette[0x3f|((pixels<<6)&0xc0)];
578670            }
579671         }
580672      }
r18509r18510
585677         UINT8 *vram8 = (UINT8 *)m_vram.target();
586678         UINT8 pixels;
587679
588         for (y = 0; y < 480; y++)
680         for (y = 0; y < vres; y++)
589681         {
590682            scanline = &bitmap.pix32(y);
591683
592            for (x = 0; x < 640/2; x++)
684            for (x = 0; x < hres/2; x++)
593685            {
594               pixels = vram8[(y * 320) + (BYTE4_XOR_BE(x))];
686               pixels = vram8[(y * 1024) + (BYTE4_XOR_BE(x))];
595687
596               *scanline++ = m_rbv_palette[0xf0|(pixels>>4)];
597               *scanline++ = m_rbv_palette[0xf0|(pixels&0xf)];
688               *scanline++ = m_rbv_palette[(pixels&0xf0) | 0xf];
689               *scanline++ = m_rbv_palette[((pixels&0x0f)<<4) | 0xf];
598690            }
599691         }
600692      }
r18509r18510
605697         UINT8 *vram8 = (UINT8 *)m_vram.target();
606698         UINT8 pixels;
607699
608         if (m_rbv_type == RBV_TYPE_SONORA)
700            for (y = 0; y < vres; y++)
701            {
702                scanline = &bitmap.pix32(y);
703
704                for (x = 0; x < hres; x++)
705                {
706                    pixels = vram8[(y * 1024) + (BYTE4_XOR_BE(x))];
707                    *scanline++ = m_rbv_palette[pixels];
708                }
709            }
710      }
711      break;
712   }
713
714   return 0;
715}
716
717UINT32 mac_state::screen_update_macsonora(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
718{
719   UINT32 *scanline;
720   int x, y, hres, vres, stride;
721
722   switch (m_rbv_montype)
723   {
724      case 1:   // 15" portrait display
725         stride = hres = 640;
726         vres = 870;
727         break;
728
729        case 2: // 12" RGB
730         stride = hres = 512;
731         vres = 384;
732         break;
733
734      case 6: // 13" RGB
735      default:
736         stride = hres = 640;
737         vres = 480;
738         break;
739   }
740
741    // forced blank?
742    if (m_sonora_vctl[0] & 0x80)
743    {
744        return 0;
745    }
746
747   switch (m_sonora_vctl[1] & 7)
748   {
749      case 0:   // 1bpp
750      {
751         UINT8 *vram8 = (UINT8 *)m_vram.target();
752         UINT8 pixels;
753
754            for (y = 0; y < vres; y++)
755            {
756                scanline = &bitmap.pix32(y);
757                for (x = 0; x < hres; x+=8)
758                {
759                    pixels = vram8[(y * (stride/8)) + ((x/8)^3)];
760
761                    *scanline++ = m_rbv_palette[0x7f|(pixels&0x80)];
762                    *scanline++ = m_rbv_palette[0x7f|((pixels<<1)&0x80)];
763                    *scanline++ = m_rbv_palette[0x7f|((pixels<<2)&0x80)];
764                    *scanline++ = m_rbv_palette[0x7f|((pixels<<3)&0x80)];
765                    *scanline++ = m_rbv_palette[0x7f|((pixels<<4)&0x80)];
766                    *scanline++ = m_rbv_palette[0x7f|((pixels<<5)&0x80)];
767                    *scanline++ = m_rbv_palette[0x7f|((pixels<<6)&0x80)];
768                    *scanline++ = m_rbv_palette[0x7f|((pixels<<7)&0x80)];
769                }
770            }
771      }
772      break;
773
774      case 1:   // 2bpp
775      {
776         UINT8 *vram8 = (UINT8 *)m_vram.target();
777         UINT8 pixels;
778
779         for (y = 0; y < vres; y++)
609780         {
610            for (y = 0; y < 480; y++)
781            scanline = &bitmap.pix32(y);
782            for (x = 0; x < hres/4; x++)
611783            {
612               scanline = &bitmap.pix32(y);
784               pixels = vram8[(y * (stride/4)) + (BYTE4_XOR_BE(x))];
613785
614               for (x = 0; x < 640; x++)
615               {
616                  pixels = vram8[(y * 0x280) + (BYTE4_XOR_BE(x))];
617                  *scanline++ = m_rbv_palette[pixels];
618               }
786               *scanline++ = m_rbv_palette[0x3f|(pixels&0xc0)];
787               *scanline++ = m_rbv_palette[0x3f|((pixels<<2)&0xc0)];
788               *scanline++ = m_rbv_palette[0x3f|((pixels<<4)&0xc0)];
789               *scanline++ = m_rbv_palette[0x3f|((pixels<<6)&0xc0)];
619790            }
620791         }
621         else
792      }
793      break;
794
795      case 2: // 4bpp
796      {
797         UINT8 *vram8 = (UINT8 *)m_vram.target();
798         UINT8 pixels;
799
800         for (y = 0; y < vres; y++)
622801         {
623            for (y = 0; y < 480; y++)
802            scanline = &bitmap.pix32(y);
803
804            for (x = 0; x < hres/2; x++)
624805            {
625               scanline = &bitmap.pix32(y);
806               pixels = vram8[(y * (stride/2)) + (BYTE4_XOR_BE(x))];
626807
627               for (x = 0; x < 640; x++)
628               {
629                  pixels = vram8[(y * 2048) + (BYTE4_XOR_BE(x))];
630                  *scanline++ = m_rbv_palette[pixels];
631               }
808               *scanline++ = m_rbv_palette[(pixels&0xf0) | 0xf];
809               *scanline++ = m_rbv_palette[((pixels&0x0f)<<4) | 0xf];
632810            }
633811         }
634812      }
813      break;
814
815      case 3: // 8bpp
816      {
817         UINT8 *vram8 = (UINT8 *)m_vram.target();
818            UINT8 pixels;
819
820            for (y = 0; y < vres; y++)
821            {
822                scanline = &bitmap.pix32(y);
823
824                for (x = 0; x < hres; x++)
825                {
826                    pixels = vram8[(y * stride) + (BYTE4_XOR_BE(x))];
827                    *scanline++ = m_rbv_palette[pixels];
828                }
829            }
830      }
831      break;
832
833        case 4: // 16bpp
834        {
835            UINT16 *vram16 = (UINT16 *)m_vram.target();
836            UINT16 pixels;
837
838            for (y = 0; y < vres; y++)
839            {
840                scanline = &bitmap.pix32(y);
841
842                for (x = 0; x < hres; x++)
843                {
844                    pixels = vram16[(y * stride) + (x^1)];
845                    *scanline++ = MAKE_RGB(((pixels>>10) & 0x1f)<<3, ((pixels>>5) & 0x1f)<<3, (pixels & 0x1f)<<3);
846                }
847            }
848        }
849        break;
635850   }
636851
637852   return 0;
trunk/src/mess/drivers/mac.c
r18509r18510
3333        SCC:
3434            PB_EXT  from mouse Y circuitry
3535            PA_EXT  from mouse X circuitry
36
36 
37    NOTES:
38        - pmac6100: with recent PPC fixes now gets into the 68000 emulator and executes part of the 680x0 startup code.
39          'g 6802c73c' to get to the interesting part (wait past the boot chime).  PPC register r24 is the 68000 PC.
40          when the PC hits GetCPUID, the move.l (a2), d0 at PC = 0x10000 will cause an MMU fault (jump to 0xFFF00300).  why?
41          a2 = 0x5ffffffc (the CPU ID register).  MMU is unable to resolve this; defect in the MMU emulation probable.
42 
3743****************************************************************************/
3844
3945
r18509r18510
182188   if (offset == 2)
183189   {
184190//        printf("Sonora: read monitor ID at PC=%x\n", m_maincpu->pc());
185      return (6 << 4);   // 640x480 RGB monitor
191      return (space.machine().root_device().ioport("MONTYPE")->read_safe(6)<<4);
186192   }
187193
188194   return m_sonora_vctl[offset];
r18509r18510
11201126   MCFG_SCREEN_RAW_PARAMS(25175000, 800, 0, 640, 525, 0, 480)
11211127   MCFG_SCREEN_SIZE(1024,768)
11221128   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
1123   MCFG_SCREEN_UPDATE_DRIVER(mac_state, screen_update_macrbvvram)
1129   MCFG_SCREEN_UPDATE_DRIVER(mac_state, screen_update_macv8)
1130   MCFG_DEFAULT_LAYOUT(layout_mac)
11241131
11251132   MCFG_RAM_MODIFY(RAM_TAG)
11261133   MCFG_RAM_DEFAULT_SIZE("2M")
r18509r18510
11561163static MACHINE_CONFIG_DERIVED( maccclas, maclc2 )
11571164
11581165    MCFG_EGRET_REMOVE()
1159    MCFG_CUDA_ADD(CUDA_341S0788, mac_cuda_interface)    // should be 341s0417, but only the color classic used that rev and those are "collectable" ($$$$)
1166    MCFG_CUDA_ADD(CUDA_341S0788, mac_cuda_interface)    // should be 0417, but that version won't sync up properly with the '030 right now
11601167MACHINE_CONFIG_END
11611168
11621169static MACHINE_CONFIG_DERIVED( maclc3, maclc )
r18509r18510
11691176   MCFG_VIDEO_RESET_OVERRIDE(mac_state,macsonora)
11701177
11711178   MCFG_SCREEN_MODIFY(MAC_SCREEN_NAME)
1172   MCFG_SCREEN_UPDATE_DRIVER(mac_state, screen_update_macrbvvram)
1179   MCFG_SCREEN_UPDATE_DRIVER(mac_state, screen_update_macsonora)
11731180
11741181   MCFG_RAM_MODIFY(RAM_TAG)
11751182   MCFG_RAM_DEFAULT_SIZE("4M")
1176   MCFG_RAM_EXTRA_OPTIONS("8M,12M,16M,20M,24M,28M,32M,36M")
1183   MCFG_RAM_EXTRA_OPTIONS("8M,16M,32M,48M,64M,80M")
11771184
11781185   MCFG_ASC_REPLACE("asc", C15M, ASC_TYPE_SONORA, mac_asc_irq)
11791186   MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
r18509r18510
14581465MACHINE_CONFIG_END
14591466#endif
14601467static MACHINE_CONFIG_DERIVED( macclas2, maclc )
1461
14621468   MCFG_CPU_REPLACE("maincpu", M68030, C15M)
14631469   MCFG_CPU_PROGRAM_MAP(maclc_map)
1470   MCFG_CPU_VBLANK_INT_DRIVER(MAC_SCREEN_NAME, mac_state,  mac_rbv_vbl)
14641471
14651472   MCFG_VIDEO_START_OVERRIDE(mac_state,macv8)
14661473   MCFG_VIDEO_RESET_OVERRIDE(mac_state,maceagle)
r18509r18510
15341541   MCFG_SCREEN_SIZE(640, 870)
15351542   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
15361543   MCFG_SCREEN_UPDATE_DRIVER(mac_state, screen_update_macrbv)
1544   MCFG_DEFAULT_LAYOUT(layout_mac)
15371545
15381546   /* internal ram */
15391547   MCFG_RAM_MODIFY(RAM_TAG)
r18509r18510
21392147COMP( 1989, maciici,  0,      0,   maciici,  maciici, mac_state,  maciici,     "Apple Computer", "Macintosh IIci", 0 )
21402148COMP( 1990, maciifx,  0,      0,   maciifx,  macadb, mac_state,   maciifx,      "Apple Computer", "Macintosh IIfx",  GAME_NOT_WORKING )
21412149COMP( 1990, macclasc, 0,      0,   macse,    macadb, mac_state,   macclassic,     "Apple Computer", "Macintosh Classic",  0 )
2142COMP( 1990, maclc,    0,      0,   maclc,    maciici, mac_state,  maclc,         "Apple Computer", "Macintosh LC",  GAME_NOT_WORKING )
2143COMP( 1990, maciisi,  0,      0,   maciisi,  maciici, mac_state,  maciisi,     "Apple Computer", "Macintosh IIsi",  GAME_NOT_WORKING )
2150COMP( 1990, maclc,    0,      0,   maclc,    maciici, mac_state,  maclc,         "Apple Computer", "Macintosh LC", GAME_IMPERFECT_SOUND )
2151COMP( 1990, maciisi,  0,      0,   maciisi,  maciici, mac_state,  maciisi,     "Apple Computer", "Macintosh IIsi", 0 )
21442152COMP( 1991, macpb100, 0,        0,  macprtb,  macadb, mac_state,   macprtb,     "Apple Computer", "Macintosh PowerBook 100", GAME_NOT_WORKING )
21452153COMP( 1991, macpb140, 0,        0,  macpb140, macadb, mac_state,   macpb140,     "Apple Computer", "Macintosh PowerBook 140", GAME_NOT_WORKING )
21462154COMP( 1991, macpb170, macpb140, 0,  macpb170, macadb, mac_state,   macpb140,     "Apple Computer", "Macintosh PowerBook 170", GAME_NOT_WORKING )
21472155COMP( 1991, macqd700, macpb140, 0,  macqd700, macadb, mac_state,   macquadra700, "Apple Computer", "Macintosh Quadra 700", GAME_NOT_WORKING )
2148COMP( 1991, macclas2, 0,      0,   macclas2, macadb, mac_state,   macclassic2,  "Apple Computer", "Macintosh Classic II",  GAME_NOT_WORKING )
2149COMP( 1991, maclc2,   0,      0,   maclc2,   maciici, mac_state,  maclc2,         "Apple Computer", "Macintosh LC II",  GAME_NOT_WORKING )
2156COMP( 1991, macclas2, 0,      0,   macclas2, macadb, mac_state,   macclassic2,  "Apple Computer", "Macintosh Classic II", GAME_IMPERFECT_SOUND )
2157COMP( 1991, maclc2,   0,      0,   maclc2,   maciici, mac_state,  maclc2,         "Apple Computer", "Macintosh LC II",  GAME_IMPERFECT_SOUND )
21502158COMP( 1992, macpb145, macpb140, 0,  macpb145, macadb, mac_state,   macpb140,     "Apple Computer", "Macintosh PowerBook 145", GAME_NOT_WORKING )
21512159COMP( 1992, macpb160, 0,        0,  macpb160, macadb, mac_state,   macpb160,     "Apple Computer", "Macintosh PowerBook 160", GAME_NOT_WORKING )
21522160COMP( 1992, macpb180, macpb160, 0,  macpb180, macadb, mac_state,   macpb160,     "Apple Computer", "Macintosh PowerBook 180", GAME_NOT_WORKING )
r18509r18510
21542162//COMP( 1992, macpd210, 0,        0,  macpd210, macadb, mac_state,   macpd210,     "Apple Computer", "Macintosh PowerBook Duo 210", GAME_NOT_WORKING )
21552163COMP( 1993, maccclas, 0,        0,  maccclas, macadb, mac_state,   maclrcclassic,"Apple Computer", "Macintosh Color Classic", GAME_NOT_WORKING )
21562164COMP( 1992, macpb145b,macpb140, 0,  macpb170, macadb, mac_state,   macpb140,     "Apple Computer", "Macintosh PowerBook 145B", GAME_NOT_WORKING )
2157COMP( 1993, maclc3,   0,      0,   maclc3,   maciici, mac_state,  maclc3,         "Apple Computer", "Macintosh LC III",  GAME_NOT_WORKING )
2158COMP( 1993, maciivx,  0,      0,   maciivx,  maciici, mac_state,  maciivx,     "Apple Computer", "Macintosh IIvx",  GAME_NOT_WORKING )
2159COMP( 1993, maciivi,  maciivx,   0,   maciivi,  maciici, mac_state,  maciivx,     "Apple Computer", "Macintosh IIvi",  GAME_NOT_WORKING )
2165COMP( 1993, maclc3,   0,      0,   maclc3,   maciici, mac_state,  maclc3,         "Apple Computer", "Macintosh LC III",  GAME_IMPERFECT_SOUND )
2166COMP( 1993, maciivx,  0,      0,   maciivx,  maciici, mac_state,  maciivx,     "Apple Computer", "Macintosh IIvx", GAME_IMPERFECT_SOUND )
2167COMP( 1993, maciivi,  maciivx,   0,   maciivi,  maciici, mac_state,  maciivx,     "Apple Computer", "Macintosh IIvi", GAME_IMPERFECT_SOUND )
21602168COMP( 1993, maclc520, 0,      0,   maclc520, maciici, mac_state,  maclc520,     "Apple Computer", "Macintosh LC 520",  GAME_NOT_WORKING )
21612169COMP( 1994, pmac6100, 0,      0,   pwrmac,   macadb, mac_state,   macpm6100,     "Apple Computer", "Power Macintosh 6100/60",  GAME_NOT_WORKING | GAME_NO_SOUND )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team