Esempio n. 1
0
static UInt8 peekIo(Microsol* rm, UInt16 ioPort)
{	
    switch (ioPort) {
	case 0xd0:
		return wd2793PeekStatusReg(rm->fdc);
	case 0xd1:
		return wd2793PeekTrackReg(rm->fdc);
	case 0xd2:
		return wd2793PeekSectorReg(rm->fdc);
	case 0xd3:
		return wd2793PeekDataReg(rm->fdc);
	case 0xd4:
        return 0x3f | 
               (wd2793PeekIrq(rm->fdc)         ? 0x80 : 0) | 
               (wd2793PeekDataRequest(rm->fdc) ? 0    : 0x40);
    }
    return 0xff;
}
Esempio n. 2
0
static UInt8 peekIo(Svi328Fdc* rm, UInt16 ioPort) 
{
    switch (ioPort) {
        case 0x30:
            return wd2793PeekStatusReg(rm->fdc);
        case 0x31:
            return wd2793PeekTrackReg(rm->fdc);
        case 0x32:
            return wd2793PeekSectorReg(rm->fdc);
        case 0x33:
            return wd2793PeekDataReg(rm->fdc);
        case 0x34:
            return rm->drvSelect;
        case 0x38:
            return 0xff;
    }
    return 0xff;
}