Previous 15994 Revisions Next

r5754 Wednesday 16th September, 2009 at 22:44:55 UTC by Angelo Salese
[z80dma]: Fixed Initiate read command
[src/emu/machine]z80dma.c

src/emu/machine/z80dma.c
r5753r5754
362362            case 0xA7:   /* Initiate read sequence */
363363               cntx->read_cur_follow = cntx->read_num_follow = 0;
364364               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)
371371               break;
372372            case 0xC3:   /* Reset */
373373               LOG(("Reset\n"));
r5753r5754
415415               /* FIXME: docs says these two is 1, but behaviour makes me think it's a 0, investigate */
416416               cntx->status &= ~0x30;
417417               break;
418            case 0xFB:
419               LOG(("Z80DMA undocumented command triggered!\n"));
420               break;
418421            default:
419422               fatalerror("Unknown WR6 command %02x", data);
420423         }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team