src/mess/machine/mac.c
| r3943 | r3944 | |
| 17 | 17 | - Mac 512ke 68k IWM orig orig Original |
| 18 | 18 | - Mac Plus 68k IWM orig ext Original |
| 19 | 19 | - Mac SE 68k IWM MacII ADB ext Original |
| 20 | | - Mac Classic 68k SWIM ADB-??? ext Original |
| 20 | - Mac Classic 68k SWIM MacII ADB ext Original |
| 21 | 21 | - Mac Portable 68k (16 MHz) SWIM ADB-PMU PMU 640x480 B&W |
| 22 | 22 | - PwrBook 100 68k (16 MHz) SWIM ADB-PMU PMU 640x480 B&W |
| 23 | 23 | - Mac II 020 IWM MacII ADB ext NuBus card |
| r3943 | r3944 | |
| 26 | 26 | - Mac SE/30 030 SWIM MacII ADB ext Internal fake NuBus card (need video declaration ROM!) |
| 27 | 27 | - Mac IIcx 030 SWIM ADB-CUDA ext NuBus card |
| 28 | 28 | - Mac IIci 030 SWIM ADB-CUDA ext Internal "RBV" type |
| 29 | - Mac LC 020 SWIM Egret ADB ext Internal "V8" type |
| 30 | - Mac LC II 030 SWIM Egret ADB ext Internal "V8" type |
| 31 | - Mac LC III 030 SWIM Egret ADB ext Internal "V8" type |
| 29 | 32 | |
| 30 | 33 | Notes: |
| 31 | 34 | - The Mac Plus boot code seems to check to see the extent of ROM |
| r3943 | r3944 | |
| 33 | 36 | then SCSI is not available. Thanks to R. Belmont for making this |
| 34 | 37 | discovery. |
| 35 | 38 | - On the SE and most later Macs, the first access to 4xxxxx turns off the overlay. |
| 36 | | However, the Mac II has the old-style VIA overlay control bit! |
| 39 | However, the Mac II/IIx/IIcx (and others?) have the old-style VIA overlay control bit! |
| 37 | 40 | - The Mac II can have either a 68551 PMMU fitted or an Apple custom that handles 24 vs. 32 |
| 38 | 41 | bit addressing mode. The ROM is *not* 32-bit clean so Mac OS normally runs in 24 bit mode, |
| 39 | 42 | but A/UX can run 32. |
| r3943 | r3944 | |
| 58 | 61 | (IM-III seems to say it does not on Mac 128k, 512k, and 512ke). |
| 59 | 62 | - What on earth are 0x700000-0x7fffff mapped to ? |
| 60 | 63 | |
| 64 | |
| 65 | Mac LC notes: |
| 66 | IOBase is 50f00000 in 32-bit mode and f00000 in 24-bit |
| 67 | VIA1 is at IOBase |
| 68 | IWM is at IOBase + 0x16000 |
| 69 | |
| 70 | |
| 61 | 71 | ****************************************************************************/ |
| 62 | 72 | |
| 63 | 73 | #include <time.h> |
| r3943 | r3944 | |
| 113 | 123 | static WRITE8_DEVICE_HANDLER(mac_via_out_b); |
| 114 | 124 | static WRITE8_DEVICE_HANDLER(mac_adb_via_out_cb2); |
| 115 | 125 | static WRITE8_DEVICE_HANDLER(mac_via_out_cb2); |
| 126 | static READ8_DEVICE_HANDLER(mac_via2_in_a); |
| 127 | static READ8_DEVICE_HANDLER(mac_via2_in_b); |
| 128 | static WRITE8_DEVICE_HANDLER(mac_via2_out_a); |
| 129 | static WRITE8_DEVICE_HANDLER(mac_via2_out_b); |
| 116 | 130 | static void mac_via_irq(const device_config *device, int state); |
| 131 | static void mac_via2_irq(const device_config *device, int state); |
| 117 | 132 | static offs_t mac_dasm_override(const device_config *device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); |
| 118 | 133 | |
| 119 | 134 | const via6522_interface mac_via6522_intf = |
| r3943 | r3944 | |
| 138 | 153 | mac_via_irq |
| 139 | 154 | }; |
| 140 | 155 | |
| 156 | const via6522_interface mac_via6522_2_intf = |
| 157 | { |
| 158 | mac_via2_in_a, mac_via2_in_b, |
| 159 | NULL, NULL, |
| 160 | NULL, NULL, |
| 161 | mac_via2_out_a, mac_via2_out_b, |
| 162 | NULL, NULL, |
| 163 | NULL, NULL, |
| 164 | mac_via2_irq |
| 165 | }; |
| 166 | |
| 141 | 167 | /* tells which model is being emulated (set by macxxx_init) */ |
| 142 | 168 | typedef enum |
| 143 | 169 | { |
| r3943 | r3944 | |
| 145 | 171 | MODEL_MAC_512KE, |
| 146 | 172 | MODEL_MAC_PLUS, |
| 147 | 173 | MODEL_MAC_SE, |
| 148 | | MODEL_MAC_CLASSIC |
| 174 | MODEL_MAC_SE_FDHD, |
| 175 | MODEL_MAC_CLASSIC, |
| 176 | MODEL_MAC_PORTABLE, |
| 177 | MODEL_MAC_PB100, |
| 178 | |
| 179 | MODEL_MAC_II, // Mac II class machines |
| 180 | MODEL_MAC_II_FDHD, |
| 181 | MODEL_MAC_IIX, |
| 182 | MODEL_MAC_IICX, |
| 183 | MODEL_MAC_IICI, |
| 184 | MODEL_MAC_IIFX, |
| 185 | MODEL_MAC_SE30, |
| 186 | |
| 187 | MODEL_MAC_LC, // LC class machines, generally all with the same memory map and the V8 gate array |
| 188 | MODEL_MAC_LC_II, |
| 189 | MODEL_MAC_LC_III, |
| 190 | MODEL_MAC_CLASSIC_II, |
| 191 | MODEL_MAC_COLOR_CLASSIC |
| 149 | 192 | } mac_model_t; |
| 150 | 193 | |
| 151 | 194 | static UINT32 mac_overlay = 0; |
| r3943 | r3944 | |
| 186 | 229 | offs_t memory_mask; |
| 187 | 230 | read16_space_func rh; |
| 188 | 231 | write16_space_func wh; |
| 232 | read32_space_func rh32; |
| 233 | write32_space_func wh32; |
| 189 | 234 | |
| 190 | 235 | memory_size = MIN(memory_size, (memory_end + 1 - memory_begin)); |
| 191 | 236 | memory_mask = memory_size - 1; |
| 192 | 237 | |
| 193 | | rh = (read16_space_func) (FPTR)bank; |
| 194 | | wh = is_rom ? SMH_UNMAP : (write16_space_func) (FPTR)bank; |
| 238 | if (mac_model < MODEL_MAC_II) |
| 239 | { |
| 240 | rh = (read16_space_func) (FPTR)bank; |
| 241 | wh = is_rom ? SMH_UNMAP : (write16_space_func) (FPTR)bank; |
| 195 | 242 | |
| 196 | | memory_install_read16_handler(space, memory_begin, |
| 197 | | memory_end, memory_mask, 0, rh); |
| 198 | | memory_install_write16_handler(space, memory_begin, |
| 199 | | memory_end, memory_mask, 0, wh); |
| 243 | memory_install_read16_handler(space, memory_begin, |
| 244 | memory_end, memory_mask, 0, rh); |
| 245 | memory_install_write16_handler(space, memory_begin, |
| 246 | memory_end, memory_mask, 0, wh); |
| 247 | } |
| 248 | else |
| 249 | { |
| 250 | rh32 = (read32_space_func) (FPTR)bank; |
| 251 | wh32 = is_rom ? SMH_UNMAP : (write32_space_func) (FPTR)bank; |
| 200 | 252 | |
| 253 | memory_install_read32_handler(space, memory_begin, |
| 254 | memory_end, memory_mask, 0, rh32); |
| 255 | memory_install_write32_handler(space, memory_begin, |
| 256 | memory_end, memory_mask, 0, wh32); |
| 257 | |
| 258 | } |
| 259 | |
| 201 | 260 | memory_set_bankptr(machine,bank, memory_data); |
| 202 | 261 | |
| 203 | 262 | if (LOG_MEMORY) |
| r3943 | r3944 | |
| 283 | 342 | /* Not Yet Implemented */ |
| 284 | 343 | } |
| 285 | 344 | |
| 286 | | |
| 287 | | |
| 288 | 345 | static void set_memory_overlay(running_machine *machine, int overlay) |
| 289 | 346 | { |
| 290 | 347 | offs_t memory_size; |
| r3943 | r3944 | |
| 316 | 373 | } |
| 317 | 374 | |
| 318 | 375 | /* install the memory */ |
| 319 | | mac_install_memory(machine, 0x000000, 0x3fffff, memory_size, memory_data, is_rom, 1); |
| 376 | if (mac_model == MODEL_MAC_LC) |
| 377 | { |
| 378 | mac_install_memory(machine, 0x000000, 0x9fffff, memory_size, memory_data, is_rom, 1); |
| 379 | } |
| 380 | else |
| 381 | { |
| 382 | mac_install_memory(machine, 0x000000, 0x3fffff, memory_size, memory_data, is_rom, 1); |
| 383 | } |
| 320 | 384 | |
| 321 | 385 | mac_overlay = overlay; |
| 322 | 386 | |
| r3943 | r3944 | |
| 868 | 932 | scc_w(scc, offset, (UINT8) data); |
| 869 | 933 | } |
| 870 | 934 | |
| 935 | WRITE16_HANDLER ( mac_scc_2_w ) |
| 936 | { |
| 937 | const device_config *scc = device_list_find_by_tag(space->machine->config->devicelist, SCC8530, "scc"); |
| 938 | UINT8 wdata = data>>8; |
| 871 | 939 | |
| 940 | scc_w(scc, offset, wdata); |
| 941 | } |
| 872 | 942 | |
| 873 | 943 | const scc8530_interface mac_scc8530_interface = |
| 874 | 944 | { |
| r3943 | r3944 | |
| 1737 | 1807 | via_w(via_0, offset, (data >> 8) & 0xff); |
| 1738 | 1808 | } |
| 1739 | 1809 | |
| 1810 | /* ************************************************************************* |
| 1811 | * VIA 2 (on Mac IIs and PowerMacs) |
| 1812 | * *************************************************************************/ |
| 1740 | 1813 | |
| 1814 | static void mac_via2_irq(const device_config *device, int state) |
| 1815 | { |
| 1816 | } |
| 1741 | 1817 | |
| 1818 | READ16_HANDLER ( mac_via2_r ) |
| 1819 | { |
| 1820 | int data; |
| 1821 | const device_config *via_1 = device_list_find_by_tag(space->machine->config->devicelist, VIA6522, "via6522_1"); |
| 1822 | |
| 1823 | offset >>= 8; |
| 1824 | offset &= 0x0f; |
| 1825 | |
| 1826 | if (LOG_VIA) |
| 1827 | logerror("mac_via2_r: offset=0x%02x\n", offset); |
| 1828 | data = via_r(via_1, offset); |
| 1829 | |
| 1830 | return (data & 0xff) | (data << 8); |
| 1831 | } |
| 1832 | |
| 1833 | WRITE16_HANDLER ( mac_via2_w ) |
| 1834 | { |
| 1835 | const device_config *via_1 = device_list_find_by_tag(space->machine->config->devicelist, VIA6522, "via6522_1"); |
| 1836 | |
| 1837 | offset >>= 8; |
| 1838 | offset &= 0x0f; |
| 1839 | |
| 1840 | if (LOG_VIA) |
| 1841 | logerror("mac_via2_w: offset=0x%02x data=0x%08x\n", offset, data); |
| 1842 | |
| 1843 | if (ACCESSING_BITS_8_15) |
| 1844 | via_w(via_1, offset, (data >> 8) & 0xff); |
| 1845 | } |
| 1846 | |
| 1847 | |
| 1848 | static READ8_DEVICE_HANDLER(mac_via2_in_a) |
| 1849 | { |
| 1850 | logerror("VIA2 IN A (PC %x)\n", cpu_get_pc(device->machine->cpu[0])); |
| 1851 | |
| 1852 | return 0; |
| 1853 | } |
| 1854 | |
| 1855 | static READ8_DEVICE_HANDLER(mac_via2_in_b) |
| 1856 | { |
| 1857 | logerror("VIA2 IN B (PC %x)\n", cpu_get_pc(device->machine->cpu[0])); |
| 1858 | |
| 1859 | return 0; |
| 1860 | } |
| 1861 | |
| 1862 | static WRITE8_DEVICE_HANDLER(mac_via2_out_a) |
| 1863 | { |
| 1864 | logerror("VIA2 OUT A: %02x (PC %x)\n", data, cpu_get_pc(device->machine->cpu[0])); |
| 1865 | } |
| 1866 | |
| 1867 | static WRITE8_DEVICE_HANDLER(mac_via2_out_b) |
| 1868 | { |
| 1869 | logerror("VIA2 OUT B: %02x (PC %x)\n", data, cpu_get_pc(device->machine->cpu[0])); |
| 1870 | } |
| 1871 | |
| 1742 | 1872 | /* ************************************************************************* |
| 1743 | 1873 | * Main |
| 1744 | 1874 | * *************************************************************************/ |
| r3943 | r3944 | |
| 1811 | 1941 | scsi_interrupt = 0; |
| 1812 | 1942 | mac_model = model; |
| 1813 | 1943 | |
| 1814 | | /* set up RAM mirror at 0x600000-0x6fffff (0x7fffff ???) */ |
| 1815 | | mac_install_memory(machine, 0x600000, 0x6fffff, mess_ram_size, mess_ram, FALSE, 2); |
| 1944 | if (model < MODEL_MAC_II) |
| 1945 | { |
| 1946 | /* set up RAM mirror at 0x600000-0x6fffff (0x7fffff ???) */ |
| 1947 | mac_install_memory(machine, 0x600000, 0x6fffff, mess_ram_size, mess_ram, FALSE, 2); |
| 1816 | 1948 | |
| 1817 | | /* set up ROM at 0x400000-0x43ffff (-0x5fffff for mac 128k/512k/512ke) */ |
| 1818 | | mac_install_memory(machine, 0x400000, (model >= MODEL_MAC_PLUS) ? 0x43ffff : 0x5fffff, |
| 1819 | | memory_region_length(machine, "user1"), memory_region(machine, "user1"), TRUE, 3); |
| 1949 | /* set up ROM at 0x400000-0x43ffff (-0x5fffff for mac 128k/512k/512ke) */ |
| 1950 | mac_install_memory(machine, 0x400000, (model >= MODEL_MAC_PLUS) ? 0x43ffff : 0x5fffff, |
| 1951 | memory_region_length(machine, "user1"), memory_region(machine, "user1"), TRUE, 3); |
| 1952 | } |
| 1953 | else if (model == MODEL_MAC_LC) |
| 1954 | { |
| 1955 | mac_install_memory(machine, 0x000000, 0x9fffff, mess_ram_size, mess_ram, FALSE, 2); |
| 1820 | 1956 | |
| 1957 | // ROM mapping is handled elsewhere for now |
| 1958 | } |
| 1959 | |
| 1821 | 1960 | set_memory_overlay(machine, 1); |
| 1822 | 1961 | |
| 1823 | 1962 | if ((model == MODEL_MAC_SE) || (model == MODEL_MAC_CLASSIC)) |
| r3943 | r3944 | |
| 1895 | 2034 | mac_driver_init(machine, MODEL_MAC_CLASSIC); |
| 1896 | 2035 | } |
| 1897 | 2036 | |
| 2037 | DRIVER_INIT(maclc) |
| 2038 | { |
| 2039 | mac_driver_init(machine, MODEL_MAC_LC); |
| 2040 | } |
| 2041 | |
| 1898 | 2042 | static void mac_vblank_irq(running_machine *machine) |
| 1899 | 2043 | { |
| 1900 | 2044 | static int irq_count = 0, ca1_data = 0, ca2_data = 0; |
src/mess/drivers/mac.c
| r3943 | r3944 | |
| 46 | 46 | #include "devices/sonydriv.h" |
| 47 | 47 | #include "devices/harddriv.h" |
| 48 | 48 | |
| 49 | // LC: boot needs 50f04000 bit 0 to go "1" at a49f00. SCC. |
| 49 | 50 | |
| 51 | /* |
| 52 | Apple Sound Chip |
| 53 | |
| 54 | Base is normally IOBase + 0x14000 |
| 55 | First 0x800 bytes is buffer RAM |
| 56 | |
| 57 | Verified to be only 8 bits wide by Apple documentation. |
| 58 | |
| 59 | Registers: |
| 60 | 0x800: CONTROL |
| 61 | 0x801: ENABLE |
| 62 | 0x802: MODE |
| 63 | 0x806: VOLUME |
| 64 | 0x807: CHAN |
| 65 | */ |
| 66 | |
| 67 | static UINT8 mac_asc_regs[0x2000]; |
| 68 | |
| 69 | static READ8_HANDLER(mac_asc_r) |
| 70 | { |
| 71 | logerror("ASC: Read @ %x (PC %x)\n", offset, cpu_get_pc(space->machine->cpu[0])); |
| 72 | |
| 73 | return mac_asc_regs[offset]; |
| 74 | } |
| 75 | |
| 76 | static WRITE8_HANDLER(mac_asc_w) |
| 77 | { |
| 78 | logerror("ASC: %02x to %x (PC %x)\n", data, offset, cpu_get_pc(space->machine->cpu[0])); |
| 79 | |
| 80 | mac_asc_regs[offset] = data; |
| 81 | } |
| 82 | |
| 50 | 83 | /*************************************************************************** |
| 51 | 84 | ADDRESS MAPS |
| 52 | 85 | ***************************************************************************/ |
| r3943 | r3944 | |
| 68 | 101 | AM_RANGE(0xfffff0, 0xffffff) AM_READWRITE(mac_autovector_r, mac_autovector_w) |
| 69 | 102 | ADDRESS_MAP_END |
| 70 | 103 | |
| 104 | static ADDRESS_MAP_START(maclc_map, ADDRESS_SPACE_PROGRAM, 32) |
| 105 | AM_RANGE(0x00fc0000, 0x00ffffff) AM_RAM AM_SHARE(1) // VRAM framebuffer |
| 106 | AM_RANGE(0x00a00000, 0x00a7ffff) AM_ROM AM_REGION("user1", 0) // ROM (in 24-bit mode) |
| 107 | AM_RANGE(0x40a00000, 0x40a7ffff) AM_ROM AM_REGION("user1", 0) // ROM (in 32-bit mode) |
| 108 | AM_RANGE(0x50f00000, 0x50f01fff) AM_READ16(mac_via_r, 0xffffffff) |
| 109 | AM_RANGE(0x50f00000, 0x50f01fff) AM_WRITE16(mac_via_w, 0xffffffff) |
| 110 | AM_RANGE(0x50f04000, 0x50f05fff) AM_READ16(mac_scc_r, 0xffffffff) AM_WRITE16(mac_scc_2_w, 0xffffffff) |
| 111 | AM_RANGE(0x50f14000, 0x50f15fff) AM_READ8(mac_asc_r, 0xffffffff) AM_WRITE8(mac_asc_w, 0xffffffff) |
| 112 | AM_RANGE(0x50f26000, 0x50f27fff) AM_READ16(mac_via2_r, 0xffffffff) // VIA2 |
| 113 | AM_RANGE(0x50f26000, 0x50f27fff) AM_WRITE16(mac_via2_w, 0xffffffff) |
| 114 | AM_RANGE(0x50fc0000, 0x50ffffff) AM_RAM AM_SHARE(1) |
| 115 | ADDRESS_MAP_END |
| 71 | 116 | |
| 72 | 117 | |
| 73 | 118 | /*************************************************************************** |
| r3943 | r3944 | |
| 153 | 198 | MDRV_VIA6522_ADD("via6522_0", 1000000, mac_via6522_adb_intf) |
| 154 | 199 | MACHINE_DRIVER_END |
| 155 | 200 | |
| 201 | static MACHINE_DRIVER_START( maclc ) |
| 202 | MDRV_IMPORT_FROM( macplus ) |
| 203 | |
| 204 | MDRV_CPU_REPLACE("main", M68020, 7833600*2) |
| 205 | MDRV_CPU_PROGRAM_MAP(maclc_map, 0) |
| 206 | |
| 207 | MDRV_VIA6522_REMOVE("via6522_0") |
| 208 | MDRV_VIA6522_ADD("via6522_0", 1000000, mac_via6522_adb_intf) |
| 209 | MDRV_VIA6522_ADD("via6522_1", 1000000, mac_via6522_2_intf) |
| 210 | MACHINE_DRIVER_END |
| 211 | |
| 156 | 212 | static INPUT_PORTS_START( macplus ) |
| 157 | 213 | PORT_START("MOUSE0") /* Mouse - button */ |
| 158 | 214 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Button") PORT_CODE(MOUSECODE_BUTTON1) |
| r3943 | r3944 | |
| 325 | 381 | ROM_LOAD16_WORD( "classic.rom", 0x00000, 0x40000, CRC(b14ddcde) SHA1(f710e73e8e0f99d9d0e9e79e71f67a6c3648bf06) ) |
| 326 | 382 | ROM_END |
| 327 | 383 | |
| 384 | ROM_START( maclc ) |
| 385 | ROM_REGION32_BE(0x100000, "user1", 0) |
| 386 | ROM_LOAD("350eacf0.rom", 0x000000, 0x080000, CRC(71681726) SHA1(6bef5853ae736f3f06c2b4e79772f65910c3b7d4)) |
| 387 | ROM_END |
| 388 | |
| 328 | 389 | static void mac128512_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 329 | 390 | { |
| 330 | 391 | /* floppy */ |
| r3943 | r3944 | |
| 376 | 437 | CONFIG_RAM (0x400000) |
| 377 | 438 | SYSTEM_CONFIG_END |
| 378 | 439 | |
| 440 | static SYSTEM_CONFIG_START(maclc) |
| 441 | CONFIG_DEVICE(mac_floppy_getinfo) |
| 442 | CONFIG_RAM_DEFAULT (0x200000) // 2 MB RAM default |
| 443 | CONFIG_RAM (0x400000) |
| 444 | CONFIG_RAM (0x600000) |
| 445 | CONFIG_RAM (0x800000) |
| 446 | CONFIG_RAM (0xa00000) // up to 10 MB |
| 447 | SYSTEM_CONFIG_END |
| 379 | 448 | |
| 380 | 449 | |
| 381 | | |
| 382 | 450 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 383 | 451 | COMP( 1984, mac128k, 0, 0, mac512ke, macplus, mac128k512k, mac128k, "Apple Computer", "Macintosh 128k", GAME_NOT_WORKING ) |
| 384 | 452 | COMP( 1984, mac512k, mac128k, 0, mac512ke, macplus, mac128k512k, mac512k, "Apple Computer", "Macintosh 512k", GAME_NOT_WORKING ) |
| r3943 | r3944 | |
| 386 | 454 | COMP( 1986, macplus, 0, 0, macplus, macplus, macplus, macplus, "Apple Computer", "Macintosh Plus", 0 ) |
| 387 | 455 | COMP( 1987, macse, 0, 0, macse, macplus, macse, macse, "Apple Computer", "Macintosh SE", 0 ) |
| 388 | 456 | COMP( 1990, macclasc, 0, 0, macse, macplus, macclassic, macse, "Apple Computer", "Macintosh Classic", GAME_NOT_WORKING ) |
| 457 | COMP( 1990, maclc, 0, 0, maclc, macplus, maclc, maclc, "Apple Computer", "Macintosh LC", GAME_NOT_WORKING ) |
| 389 | 458 | |
| 390 | | |
| 391 | | |
| 392 | | /* ----------------------------------------------------------------------- */ |
| 393 | | |
| 394 | | #if 0 |
| 395 | | |
| 396 | | /* Early Mac2 driver - does not work at all, but enabled me to disassemble the ROMs */ |
| 397 | | |
| 398 | | static ADDRESS_MAP_START (mac2_mem, ADDRESS_SPACE_PROGRAM, 16) |
| 399 | | |
| 400 | | AM_RANGE( 0x00000000, 0x007fffff) AM_RAM |
| 401 | | AM_RANGE( 0x00800000, 0x008fffff) AM_ROM |
| 402 | | AM_RANGE( 0x00900000, 0x00ffffff) AM_NOP |
| 403 | | |
| 404 | | ADDRESS_MAP_END |
| 405 | | |
| 406 | | static void mac2_init_machine( void ) |
| 407 | | { |
| 408 | | memset(memory_region(machine, "main"), 0, 0x800000); |
| 409 | | } |
| 410 | | |
| 411 | | |
| 412 | | static const struct MachineDriver machine_driver_mac2 = |
| 413 | | { |
| 414 | | /* basic machine hardware */ |
| 415 | | { |
| 416 | | { |
| 417 | | CPU_M68020, |
| 418 | | 16000000, /* +/- 16 MHz */ |
| 419 | | mac2_mem,0,0,0, |
| 420 | | 0,0, |
| 421 | | } |
| 422 | | }, |
| 423 | | 60, ATTOSECONDS_IN_USEC(2500) /* not accurate */, /* frames per second, vblank duration */ |
| 424 | | 1, |
| 425 | | mac2_init_machine, |
| 426 | | 0, |
| 427 | | |
| 428 | | /* video hardware */ |
| 429 | | 640, 480, /* screen width, screen height */ |
| 430 | | { 0, 640-1, 0, 480-1 }, /* visible_area */ |
| 431 | | |
| 432 | | 0, /* graphics decode info */ |
| 433 | | 2, 2, /* number of colors, colortable size */ |
| 434 | | mac_init_palette, /* convert color prom */ |
| 435 | | |
| 436 | | VIDEO_UPDATE_BEFORE_VBLANK, |
| 437 | | 0, |
| 438 | | mac_vh_start, |
| 439 | | mac_vh_stop, |
| 440 | | mac_vh_screenrefresh, |
| 441 | | |
| 442 | | /* sound hardware */ |
| 443 | | 0,0,0,0, |
| 444 | | { |
| 445 | | |
| 446 | | }, |
| 447 | | |
| 448 | | mac_nvram_handler |
| 449 | | }; |
| 450 | | |
| 451 | | //#define input_ports_mac2 NULL |
| 452 | | |
| 453 | | static INPUT_PORTS_START( mac2 ) |
| 454 | | |
| 455 | | INPUT_PORTS_END |
| 456 | | |
| 457 | | ROM_START( mac2 ) |
| 458 | | ROM_REGION(0x00900000,"main",0) /* for ram, etc */ |
| 459 | | ROM_LOAD_WIDE( "256k.rom", 0x800000, 0x40000, NO_DUMP) |
| 460 | | ROM_END |
| 461 | | |
| 462 | | COMPX( 1987, mac2, 0, mac2, mac2, 0/*mac2*/, "Apple Computer", "Macintosh II", GAME_NOT_WORKING ) |
| 463 | | |
| 464 | | #endif |
| 465 | | |