Exemple #1
0
        static ControlLines DBus2Reg8(HLBusReg8 reg)
        {
            switch (reg)
            {
            case HLBusReg8.W:
            case HLBusReg8.B:
            case HLBusReg8.D:
            case HLBusReg8.H:
            case HLBusReg8.SPh:
            case HLBusReg8.PCh:
            case HLBusReg8.LRh:
                return(DBus2HBus | WriteReg8(reg));

            case HLBusReg8.Z:
            case HLBusReg8.C:
            case HLBusReg8.E:
            case HLBusReg8.L:
            case HLBusReg8.SPl:
            case HLBusReg8.PCl:
            case HLBusReg8.LRl:
                return(DBus2LBus | WriteReg8(reg));

            default:
                throw new ArgumentException(reg.ToString());
            }
        }
Exemple #2
0
        static ControlLines ReadReg8(HLBusReg8 reg)
        {
            switch (reg)
            {
            case W:
                return(Reg2HBusSelW);

            case B:
                return(Reg2HBusSelB);

            case D:
                return(Reg2HBusSelD);

            case H:
                return(Reg2HBusSelH);

            case SPh:
                return(Reg2HBusSelSPh);

            case PCh:
                return(Reg2HBusSelPCh);

            case LRh:
                return(Reg2HBusSelLRh);

            case IXh:
                return(Reg2HBusSelIXh);

            case IYh:
                return(Reg2HBusSelIYh);

            case IVh:
                return(Reg2HBusSelIVh);

            case Z:
                return(Reg2LBusSelZ);

            case C:
                return(Reg2LBusSelC);

            case E:
                return(Reg2LBusSelE);

            case L:
                return(Reg2LBusSelL);

            case SPl:
                return(Reg2LBusSelSPl);

            case PCl:
                return(Reg2LBusSelPCl);

            case LRl:
                return(Reg2LBusSelLRl);

            case IXl:
                return(Reg2LBusSelIXl);

            case IYl:
                return(Reg2LBusSelIYl);

            case IVl:
                return(Reg2LBusSelIVl);

            default:
                throw new ArgumentException(reg.ToString());
            }
        }