src/emu/machine/z80dma.c
| r5751 | r5752 | |
| 347 | 347 | case 0xB3: /* Force ready */ |
| 348 | 348 | case 0xB7: /* Enable after rti */ |
| 349 | 349 | case 0xBF: /* Read status byte */ |
| 350 | | case 0xD3: /* Continue */ |
| 351 | 350 | fatalerror("Unimplemented WR6 command %02x", data); |
| 352 | 351 | break; |
| 353 | 352 | case 0xA7: /* Initiate read sequence */ |
| 354 | 353 | cntx->read_cur_follow = cntx->read_num_follow = 0; |
| 355 | 354 | if(READ_MASK(cntx) & 0x01) { cntx->read_regs_follow[cntx->read_num_follow++] = cntx->status; } |
| 356 | | if(READ_MASK(cntx) & 0x02) { cntx->read_regs_follow[cntx->read_num_follow++] = cntx->count & 0xff; } //byte counter (low) |
| 357 | | if(READ_MASK(cntx) & 0x04) { cntx->read_regs_follow[cntx->read_num_follow++] = (cntx->count >> 8) & 0xff; } //byte counter (high) |
| 358 | | if(READ_MASK(cntx) & 0x08) { cntx->read_regs_follow[cntx->read_num_follow++] = cntx->addressA & 0xff; } //port A address (low) |
| 359 | | if(READ_MASK(cntx) & 0x10) { cntx->read_regs_follow[cntx->read_num_follow++] = (cntx->addressA >> 8) & 0xff; } //port A address (high) |
| 360 | | if(READ_MASK(cntx) & 0x20) { cntx->read_regs_follow[cntx->read_num_follow++] = cntx->addressB & 0xff; } //port B address (low) |
| 361 | | if(READ_MASK(cntx) & 0x40) { cntx->read_regs_follow[cntx->read_num_follow++] = (cntx->addressB >> 8) & 0xff; } //port B address (high) |
| 355 | if(READ_MASK(cntx) & 0x02) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, BLOCKLEN_L(cntx)); } //byte counter (low) |
| 356 | if(READ_MASK(cntx) & 0x04) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, BLOCKLEN_H(cntx)); } //byte counter (high) |
| 357 | if(READ_MASK(cntx) & 0x08) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_L(cntx)); } //port A address (low) |
| 358 | if(READ_MASK(cntx) & 0x10) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_H(cntx)); } //port A address (high) |
| 359 | if(READ_MASK(cntx) & 0x20) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTB_ADDRESS_L(cntx)); } //port B address (low) |
| 360 | if(READ_MASK(cntx) & 0x40) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_H(cntx)); } //port B address (high) |
| 362 | 361 | break; |
| 363 | 362 | case 0xC3: /* Reset */ |
| 364 | 363 | LOG(("Reset\n")); |
| r5751 | r5752 | |
| 380 | 379 | case 0xBB: |
| 381 | 380 | cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, READ_MASK(cntx)); |
| 382 | 381 | break; |
| 382 | case 0xD3: /* Continue */ |
| 383 | cntx->count = 0; |
| 384 | cntx->dma_enabled = 1; |
| 385 | //FIXME: "mach" & "endb" flags should be zeroed here |
| 386 | break; |
| 387 | case 0xc7: /* Reset Port A Timing */ |
| 388 | PORTA_TIMING(cntx) = 0; |
| 389 | break; |
| 390 | case 0xcb: /* Reset Port B Timing */ |
| 391 | PORTB_TIMING(cntx) = 0; |
| 392 | break; |
| 383 | 393 | default: |
| 384 | 394 | fatalerror("Unknown WR6 command %02x", data); |
| 385 | 395 | } |