src/mess/drivers/pc6001.c
| r4871 | r4872 | |
| 127 | 127 | ppi8255_w(device,offset,data); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | WRITE8_DEVICE_HANDLER(pc6100_ay8910_address_w) { |
| 131 | ay8910_address_w(device,offset,data & 0x0f); |
| 132 | } |
| 133 | |
| 130 | 134 | static ADDRESS_MAP_START(pc6001_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 131 | 135 | ADDRESS_MAP_UNMAP_HIGH |
| 132 | 136 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| r4871 | r4872 | |
| 140 | 144 | AM_RANGE(0x81, 0x81) AM_DEVREADWRITE("uart", msm8251_status_r,msm8251_control_w) |
| 141 | 145 | AM_RANGE(0x90, 0x93) AM_DEVREADWRITE("ppi8255", nec_ppi8255_r, nec_ppi8255_w) |
| 142 | 146 | AM_RANGE(0xB0, 0xB0) AM_WRITE(pc6001_system_latch_w) |
| 143 | | AM_RANGE(0xA0, 0xA0) AM_DEVWRITE("ay8910", ay8910_address_w) |
| 147 | AM_RANGE(0xA0, 0xA0) AM_DEVWRITE("ay8910", pc6100_ay8910_address_w) |
| 144 | 148 | AM_RANGE(0xA1, 0xA1) AM_DEVWRITE("ay8910", ay8910_data_w) |
| 145 | 149 | ADDRESS_MAP_END |
| 146 | 150 | |
| r4871 | r4872 | |
| 157 | 161 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 158 | 162 | INPUT_PORTS_END |
| 159 | 163 | |
| 164 | UINT8 irq_vector = 0x00; |
| 165 | |
| 166 | INTERRUPT_GEN( pc6001_interrupt ) |
| 167 | { |
| 168 | irq_vector = 0x16; |
| 169 | cpu_set_input_line(device, 0, HOLD_LINE); |
| 170 | } |
| 171 | |
| 172 | static IRQ_CALLBACK ( pc6001_irq_callback ) |
| 173 | { |
| 174 | return irq_vector; |
| 175 | } |
| 176 | |
| 160 | 177 | static MACHINE_RESET(pc6001) |
| 161 | 178 | { |
| 162 | 179 | port_c_8255=0; |
| 163 | 180 | pc6001_video_ram = pc6001_ram; |
| 181 | |
| 182 | cpu_set_irq_callback(cputag_get_cpu(machine, "maincpu"),pc6001_irq_callback); |
| 164 | 183 | } |
| 165 | 184 | |
| 166 | 185 | static VIDEO_START( pc6001 ) |
| r4871 | r4872 | |
| 182 | 201 | } |
| 183 | 202 | static WRITE8_DEVICE_HANDLER (pc6001_8255_porta_w ) |
| 184 | 203 | { |
| 204 | // logerror("pc6001_8255_porta_w %02x\n",data); |
| 185 | 205 | } |
| 186 | 206 | |
| 187 | 207 | static READ8_DEVICE_HANDLER (pc6001_8255_portb_r ) |
| r4871 | r4872 | |
| 190 | 210 | } |
| 191 | 211 | static WRITE8_DEVICE_HANDLER (pc6001_8255_portb_w ) |
| 192 | 212 | { |
| 213 | //logerror("pc6001_8255_portb_w %02x\n",data); |
| 193 | 214 | } |
| 194 | 215 | |
| 195 | 216 | static WRITE8_DEVICE_HANDLER (pc6001_8255_portc_w ) |
| 196 | 217 | { |
| 218 | //logerror("pc6001_8255_portc_w %02x\n",data); |
| 197 | 219 | } |
| 198 | 220 | |
| 199 | 221 | static READ8_DEVICE_HANDLER (pc6001_8255_portc_r ) |
| 200 | 222 | { |
| 201 | | return 0; |
| 223 | return 0x88; |
| 202 | 224 | } |
| 203 | 225 | |
| 226 | |
| 227 | |
| 204 | 228 | const ppi8255_interface pc6001_ppi8255_interface = |
| 205 | 229 | { |
| 206 | 230 | DEVCB_HANDLER(pc6001_8255_porta_r), |
| r4871 | r4872 | |
| 231 | 255 | MDRV_CPU_ADD("maincpu",Z80, 7987200 /2) |
| 232 | 256 | MDRV_CPU_PROGRAM_MAP(pc6001_mem) |
| 233 | 257 | MDRV_CPU_IO_MAP(pc6001_io) |
| 258 | MDRV_CPU_VBLANK_INT("screen", pc6001_interrupt) |
| 234 | 259 | |
| 235 | 260 | // MDRV_CPU_ADD("subcpu", I8049, 7987200) |
| 236 | 261 | |