src/mess/machine/apple2.c
| r14878 | r14879 | |
| 798 | 798 | static void apple2_mem_C300(running_machine &machine, offs_t begin, offs_t end, apple2_meminfo *meminfo) |
| 799 | 799 | { |
| 800 | 800 | apple2_state *state = machine.driver_data<apple2_state>(); |
| 801 | | if ((state->m_flags & (VAR_INTCXROM|VAR_SLOTC3ROM)) != VAR_SLOTC3ROM) |
| 801 | if (((state->m_flags & (VAR_INTCXROM|VAR_SLOTC3ROM)) != VAR_SLOTC3ROM) && !(state->m_flags_mask & VAR_SLOTC3ROM)) |
| 802 | 802 | { |
| 803 | 803 | meminfo->read_mem = (begin & 0x0FFF) | (state->m_flags & VAR_ROMSWITCH ? 0x4000 : 0x0000) | APPLE2_MEM_ROM; |
| 804 | 804 | meminfo->write_mem = APPLE2_MEM_FLOATING; |
| r14878 | r14879 | |
| 940 | 940 | state->m_flags &= ~mask; |
| 941 | 941 | state->m_flags |= val; |
| 942 | 942 | |
| 943 | // disable flags that don't apply (INTCXROM/SLOTC3ROM on II/II+ for instance) |
| 944 | state->m_flags &= ~state->m_flags_mask; |
| 945 | |
| 943 | 946 | apple2_update_memory(machine); |
| 944 | 947 | } |
| 945 | 948 | |
| r14878 | r14879 | |
| 1697 | 1700 | { |
| 1698 | 1701 | apple2_memmap_config mem_cfg; |
| 1699 | 1702 | void *apple2cp_ce00_ram = NULL; |
| 1703 | apple2_state *state = machine.driver_data<apple2_state>(); |
| 1700 | 1704 | |
| 1705 | state->m_flags_mask = 0; |
| 1706 | |
| 1701 | 1707 | /* there appears to be some hidden RAM that is swapped in on the Apple |
| 1702 | 1708 | * IIc plus; I have not found any official documentation but the BIOS |
| 1703 | 1709 | * clearly uses this area as writeable memory */ |
| r14878 | r14879 | |
| 1717 | 1723 | apple2_reset(machine); |
| 1718 | 1724 | } |
| 1719 | 1725 | |
| 1726 | MACHINE_START( apple2orig ) |
| 1727 | { |
| 1728 | apple2_memmap_config mem_cfg; |
| 1729 | void *apple2cp_ce00_ram = NULL; |
| 1730 | apple2_state *state = machine.driver_data<apple2_state>(); |
| 1720 | 1731 | |
| 1732 | // II and II+ have no internal ROM or internal slot 3 h/w, so don't allow these states |
| 1733 | state->m_flags_mask = VAR_INTCXROM|VAR_SLOTC3ROM; |
| 1721 | 1734 | |
| 1735 | apple2_init_common(machine); |
| 1736 | |
| 1737 | /* setup memory */ |
| 1738 | memset(&mem_cfg, 0, sizeof(mem_cfg)); |
| 1739 | mem_cfg.first_bank = 1; |
| 1740 | mem_cfg.memmap = apple2_memmap_entries; |
| 1741 | mem_cfg.auxmem = (UINT8*)apple2cp_ce00_ram; |
| 1742 | apple2_setup_memory(machine, &mem_cfg); |
| 1743 | |
| 1744 | /* perform initial reset */ |
| 1745 | apple2_reset(machine); |
| 1746 | } |
| 1747 | |
| 1748 | |
| 1722 | 1749 | int apple2_pressed_specialkey(running_machine &machine, UINT8 key) |
| 1723 | 1750 | { |
| 1724 | 1751 | return (input_port_read(machine, "keyb_special") & key) |
src/mess/includes/apple2.h
| r14878 | r14879 | |
| 117 | 117 | required_device<cpu_device> m_maincpu; |
| 118 | 118 | required_device<a2bus_device> m_a2bus; |
| 119 | 119 | |
| 120 | | UINT32 m_flags; |
| 120 | UINT32 m_flags, m_flags_mask; |
| 121 | 121 | INT32 m_a2_cnxx_slot; |
| 122 | 122 | UINT32 m_a2_mask; |
| 123 | 123 | UINT32 m_a2_set; |
| r14878 | r14879 | |
| 167 | 167 | |
| 168 | 168 | void apple2_init_common(running_machine &machine); |
| 169 | 169 | MACHINE_START( apple2 ); |
| 170 | MACHINE_START( apple2orig ); |
| 170 | 171 | UINT8 apple2_getfloatingbusvalue(running_machine &machine); |
| 171 | 172 | READ8_HANDLER( apple2_c0xx_r ); |
| 172 | 173 | WRITE8_HANDLER( apple2_c0xx_w ); |