src/emu/machine/z80dma.c
| r5753 | r5754 | |
| 362 | 362 | case 0xA7: /* Initiate read sequence */ |
| 363 | 363 | cntx->read_cur_follow = cntx->read_num_follow = 0; |
| 364 | 364 | if(READ_MASK(cntx) & 0x01) { cntx->read_regs_follow[cntx->read_num_follow++] = cntx->status; } |
| 365 | | if(READ_MASK(cntx) & 0x02) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, BLOCKLEN_L(cntx)); } //byte counter (low) |
| 366 | | if(READ_MASK(cntx) & 0x04) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, BLOCKLEN_H(cntx)); } //byte counter (high) |
| 367 | | if(READ_MASK(cntx) & 0x08) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_L(cntx)); } //port A address (low) |
| 368 | | if(READ_MASK(cntx) & 0x10) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_H(cntx)); } //port A address (high) |
| 369 | | if(READ_MASK(cntx) & 0x20) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTB_ADDRESS_L(cntx)); } //port B address (low) |
| 370 | | if(READ_MASK(cntx) & 0x40) { cntx->read_regs_follow[cntx->read_num_follow++] = GET_REGNUM(cntx, PORTA_ADDRESS_H(cntx)); } //port B address (high) |
| 365 | if(READ_MASK(cntx) & 0x02) { cntx->read_regs_follow[cntx->read_num_follow++] = BLOCKLEN_L(cntx); } //byte counter (low) |
| 366 | if(READ_MASK(cntx) & 0x04) { cntx->read_regs_follow[cntx->read_num_follow++] = BLOCKLEN_H(cntx); } //byte counter (high) |
| 367 | if(READ_MASK(cntx) & 0x08) { cntx->read_regs_follow[cntx->read_num_follow++] = PORTA_ADDRESS_L(cntx); } //port A address (low) |
| 368 | if(READ_MASK(cntx) & 0x10) { cntx->read_regs_follow[cntx->read_num_follow++] = PORTA_ADDRESS_H(cntx); } //port A address (high) |
| 369 | if(READ_MASK(cntx) & 0x20) { cntx->read_regs_follow[cntx->read_num_follow++] = PORTB_ADDRESS_L(cntx); } //port B address (low) |
| 370 | if(READ_MASK(cntx) & 0x40) { cntx->read_regs_follow[cntx->read_num_follow++] = PORTA_ADDRESS_H(cntx); } //port B address (high) |
| 371 | 371 | break; |
| 372 | 372 | case 0xC3: /* Reset */ |
| 373 | 373 | LOG(("Reset\n")); |
| r5753 | r5754 | |
| 415 | 415 | /* FIXME: docs says these two is 1, but behaviour makes me think it's a 0, investigate */ |
| 416 | 416 | cntx->status &= ~0x30; |
| 417 | 417 | break; |
| 418 | case 0xFB: |
| 419 | LOG(("Z80DMA undocumented command triggered!\n")); |
| 420 | break; |
| 418 | 421 | default: |
| 419 | 422 | fatalerror("Unknown WR6 command %02x", data); |
| 420 | 423 | } |