Previous 15994 Revisions Next

r5752 Wednesday 16th September, 2009 at 21:32:12 UTC by Angelo Salese
[z80dma]: Added continue and reset port A/B timing commands
[src/emu/machine]z80dma.c

src/emu/machine/z80dma.c
r5751r5752
347347            case 0xB3:   /* Force ready */
348348            case 0xB7:   /* Enable after rti */
349349            case 0xBF:   /* Read status byte */
350            case 0xD3:   /* Continue */
351350               fatalerror("Unimplemented WR6 command %02x", data);
352351               break;
353352            case 0xA7:   /* Initiate read sequence */
354353               cntx->read_cur_follow = cntx->read_num_follow = 0;
355354               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)
362361               break;
363362            case 0xC3:   /* Reset */
364363               LOG(("Reset\n"));
r5751r5752
380379            case 0xBB:
381380               cntx->regs_follow[cntx->num_follow++] = GET_REGNUM(cntx, READ_MASK(cntx));
382381               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;
383393            default:
384394               fatalerror("Unknown WR6 command %02x", data);
385395         }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team