Previous 15994 Revisions Next

r3100 Monday 25th August, 2008 at 01:11:25 UTC by R. Belmont
[MAC CLASSIC] Classic now beeps, recognizes ADB, and tries to boot. Needs SWIM or SCSI IRQs to do so.
[src/mess/machine]mac.c

src/mess/machine/mac.c
r3099r3100
15061506
15071507static READ8_HANDLER(mac_via_in_a)
15081508{
1509   if (mac_model == MODEL_MAC_CLASSIC)
1510   {
1511      return 0x81;      // bit 0 must be set to avoid attempting to boot from AppleTalk
1512   }
1513
15091514   return 0x80;
15101515}
15111516
r3099r3100
16201625 * Main
16211626 * *************************************************************************/
16221627
1623static TIMER_CALLBACK(set_memory_overlay_callback)
1624{
1625   set_memory_overlay(machine, param);
1626}
1627
16281628MACHINE_RESET(mac)
16291629{
16301630   /* initialize real-time clock */
r3099r3100
16501650      timer_adjust_oneshot(mac_adb_timer, attotime_never, 0);
16511651   }
16521652
1653   if (mac_model == MODEL_MAC_SE)
1653   if ((mac_model == MODEL_MAC_SE) || (mac_model == MODEL_MAC_CLASSIC))
16541654   {
1655      timer_set(attotime_zero, NULL, 0, set_memory_overlay_callback);
16561655      mac_set_sound_buffer(1);
1656
1657      // classic will fail RAM test and try to boot appletalk if RAM is not all zero
1658      memset(mess_ram, 0, mess_ram_size);
16571659   }
16581660
16591661   mac_scanline_timer = timer_alloc(mac_scanline_tick, NULL);
r3099r3100
16701672}
16711673
16721674
1675static OPBASE_HANDLER (overlay_opbaseoverride)
1676{
1677   if (mac_overlay != -1)
1678   {
1679      if ((address >= 0x400000) && (address <= 0x4fffff))
1680      {
1681         set_memory_overlay(machine, 0);      // kill the overlay
1682         mac_overlay = -1;
1683      }
1684   }
16731685
1686   return address;
1687}
1688
16741689static void mac_driver_init(running_machine *machine, mac_model_t model)
16751690{
16761691   mac_overlay = -1;
r3099r3100
16851700
16861701   set_memory_overlay(machine, 1);
16871702
1703   if ((model == MODEL_MAC_SE) || (model == MODEL_MAC_CLASSIC))
1704   {
1705      // classic will fail RAM test and try to boot appletalk if RAM is not all zero
1706      memset(mess_ram, 0, mess_ram_size);
1707
1708      memory_set_opbase_handler(0, overlay_opbaseoverride);
1709      mac_overlay = 1;
1710   }
1711
16881712   /* configure via */
16891713   if (has_adb())
16901714   {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team