static ControlLines ReadLReg16(HLBusReg16 reg) { switch (reg) { case WZ: return(ReadReg8(Z)); case BC: return(ReadReg8(C)); case DE: return(ReadReg8(E)); case HL: return(ReadReg8(L)); case SP: return(ReadReg8(SPl)); case PC: return(ReadReg8(PCl)); case LR: return(ReadReg8(LRl)); case IX: return(ReadReg8(IXl)); case IY: return(ReadReg8(IYl)); case IV: return(ReadReg8(IVl)); default: throw new ArgumentException(reg.ToString()); } }
static ControlLines WriteHReg16(HLBusReg16 reg) { switch (reg) { case WZ: return(WriteReg8(W)); case BC: return(WriteReg8(B)); case DE: return(WriteReg8(D)); case HL: return(WriteReg8(H)); case SP: return(WriteReg8(SPh)); case PC: return(WriteReg8(PCh)); case LR: return(WriteReg8(LRh)); case IX: return(WriteReg8(IXh)); case IY: return(WriteReg8(IYh)); case IV: return(WriteReg8(IVh)); default: throw new ArgumentException(reg.ToString()); } }