src/emu/cpu/cop400/cop420.c
| r2815 | r2816 | |
| 226 | 226 | |
| 227 | 227 | static TIMER_CALLBACK(cop420_counter_tick) |
| 228 | 228 | { |
| 229 | cpuintrf_push_context(param); |
| 229 | 230 | R.counter++; |
| 230 | 231 | |
| 231 | 232 | if (R.counter == 1024) |
| r2815 | r2816 | |
| 233 | 234 | R.counter = 0; |
| 234 | 235 | R.timerlatch = 1; |
| 235 | 236 | } |
| 237 | cpuintrf_pop_context(); |
| 236 | 238 | } |
| 237 | 239 | |
| 238 | 240 | /* IN Latches */ |
| 239 | 241 | |
| 240 | 242 | static TIMER_CALLBACK(cop420_inil_tick) |
| 241 | 243 | { |
| 242 | | UINT8 in = IN_IN(); |
| 244 | UINT8 in; |
| 243 | 245 | int i; |
| 244 | 246 | |
| 247 | cpuintrf_push_context(param); |
| 248 | in = IN_IN(); |
| 245 | 249 | for (i = 0; i < 4; i++) |
| 246 | 250 | { |
| 247 | 251 | R.in[i] = (R.in[i] << 1) | BIT(in, i); |
| r2815 | r2816 | |
| 251 | 255 | IL |= (1 << i); |
| 252 | 256 | } |
| 253 | 257 | } |
| 258 | cpuintrf_pop_context(); |
| 254 | 259 | } |
| 255 | 260 | |
| 256 | 261 | /* Microbus */ |
| 257 | 262 | |
| 258 | 263 | static TIMER_CALLBACK(cop420_microbus_tick) |
| 259 | 264 | { |
| 260 | | UINT8 in = IN_IN(); |
| 265 | UINT8 in; |
| 261 | 266 | |
| 267 | cpuintrf_push_context(param); |
| 268 | in = IN_IN(); |
| 262 | 269 | if (!BIT(in, 2)) |
| 263 | 270 | { |
| 264 | 271 | // chip select |
| r2815 | r2816 | |
| 280 | 287 | R.microbus_int = 0; |
| 281 | 288 | } |
| 282 | 289 | } |
| 290 | cpuintrf_pop_context(); |
| 283 | 291 | } |
| 284 | 292 | |
| 285 | 293 | /**************************************************************************** |