src/mess/machine/a2memexp.c
| r14874 | r14875 | |
| 131 | 131 | m_regs[2] = ((m_liveptr>>16) & 0xff) | 0xf0; |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | | // printf("Read c0n%x (PC=%x) = %02x\n", offset, cpu_get_pc(&space.device()), retval); |
| 134 | // if (offset > 3) printf("Read c0n%x (PC=%x) = %02x\n", offset, cpu_get_pc(&space.device()), retval); |
| 135 | 135 | |
| 136 | 136 | return retval; |
| 137 | 137 | } |
| r14874 | r14875 | |
| 143 | 143 | |
| 144 | 144 | void a2bus_memexp_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data) |
| 145 | 145 | { |
| 146 | | // printf("Write %02x to c0n%x (PC=%x)\n", data, offset, cpu_get_pc(&space.device())); |
| 146 | // if (offset > 3) printf("Write %02x to c0n%x (PC=%x)\n", data, offset, cpu_get_pc(&space.device())); |
| 147 | 147 | |
| 148 | 148 | switch (offset) |
| 149 | 149 | { |
| r14874 | r14875 | |
| 198 | 198 | int slotimg = m_slot * 0x100; |
| 199 | 199 | |
| 200 | 200 | // first 0x400 of ROM contains a CnXX image for each of slots 1-7, last 0x400 is c800 image |
| 201 | if ((m_isramfactor) && (m_regs[0xf] & 0x01)) |
| 202 | { |
| 203 | return m_rom[offset+slotimg+0x1000]; |
| 204 | } |
| 205 | |
| 201 | 206 | return m_rom[offset+slotimg]; |
| 202 | 207 | } |
| 203 | 208 | |
| r14874 | r14875 | |
| 207 | 212 | |
| 208 | 213 | UINT8 a2bus_memexp_device::read_c800(address_space &space, UINT16 offset) |
| 209 | 214 | { |
| 215 | // c70a diags confirm: bit 1 of cn0F banks in the second half of the ROM |
| 216 | if ((m_isramfactor) && (m_regs[0xf] & 0x01)) |
| 217 | { |
| 218 | return m_rom[offset+0x1800]; |
| 219 | } |
| 220 | |
| 210 | 221 | return m_rom[offset+0x800]; |
| 211 | 222 | } |
src/mess/machine/apple2.c
| r14874 | r14875 | |
| 760 | 760 | static void apple2_mem_C800(running_machine &machine, offs_t begin, offs_t end, apple2_meminfo *meminfo) |
| 761 | 761 | { |
| 762 | 762 | apple2_state *state = machine.driver_data<apple2_state>(); |
| 763 | | if (state->m_a2_cnxx_slot == -1) |
| 763 | if (state->m_flags & VAR_INTCXROM) |
| 764 | 764 | { |
| 765 | 765 | meminfo->read_mem = (begin & 0x0FFF) | (state->m_flags & VAR_ROMSWITCH ? 0x4000 : 0x0000) | APPLE2_MEM_ROM; |
| 766 | 766 | meminfo->write_mem = APPLE2_MEM_FLOATING; |
| r14874 | r14875 | |
| 782 | 782 | } |
| 783 | 783 | else |
| 784 | 784 | { |
| 785 | | if (state->m_a2_cnxx_slot == -1) |
| 785 | if (state->m_flags & VAR_INTCXROM) |
| 786 | 786 | { |
| 787 | 787 | meminfo->read_mem = (begin & 0x0FFF) | (state->m_flags & VAR_ROMSWITCH ? 0x4000 : 0x0000) | APPLE2_MEM_ROM; |
| 788 | 788 | meminfo->write_mem = APPLE2_MEM_FLOATING; |
| r14874 | r14875 | |
| 887 | 887 | state->m_flags &= ~mask; |
| 888 | 888 | state->m_flags |= val; |
| 889 | 889 | |
| 890 | | if (state->m_flags & VAR_INTCXROM) |
| 891 | | { |
| 892 | | state->m_a2_cnxx_slot = -1; |
| 893 | | } |
| 894 | | |
| 895 | 890 | apple2_update_memory(machine); |
| 896 | 891 | } |
| 897 | 892 | |