src/mess/machine/microtan.c
| r2932 | r2933 | |
| 134 | 134 | }, |
| 135 | 135 | }; |
| 136 | 136 | |
| 137 | static UINT8 read_dsw(running_machine *machine) |
| 138 | { |
| 139 | UINT8 result; |
| 140 | switch(mame_get_phase(machine)) |
| 141 | { |
| 142 | case MAME_PHASE_RESET: |
| 143 | case MAME_PHASE_RUNNING: |
| 144 | result = input_port_read(machine, "DSW"); |
| 145 | break; |
| 146 | |
| 147 | default: |
| 148 | result = 0x00; |
| 149 | break; |
| 150 | } |
| 151 | return result; |
| 152 | } |
| 153 | |
| 137 | 154 | static void microtan_set_irq_line(running_machine *machine) |
| 138 | 155 | { |
| 139 | 156 | /* The 6502 IRQ line is active low and probably driven |
| r2932 | r2933 | |
| 882 | 899 | dst += 4; |
| 883 | 900 | } |
| 884 | 901 | |
| 885 | | switch (input_port_read(machine, "DSW") & 3) |
| 902 | switch (read_dsw(machine) & 3) |
| 886 | 903 | { |
| 887 | 904 | case 0: // 1K only :) |
| 888 | 905 | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x0400, 0xbbff, 0, 0, SMH_NOP); |