public GateArrayBase(CPCBase machine) { _machine = machine; PenColours = new int[17]; SetupScreenSize(); Reset(); }
private void Init(MachineType machineType, List <byte[]> files, bool autoTape, BorderType bType) { _machineType = machineType; // setup the emulated model based on the MachineType switch (machineType) { case MachineType.CPC464: _machine = new CPC464(this, _cpu, files, autoTape, bType); var roms64 = new List <RomData>(); roms64.Add(RomData.InitROM(MachineType.CPC464, GetFirmware(0x4000, "OS464ROM"), RomData.ROMChipType.Lower)); roms64.Add(RomData.InitROM(MachineType.CPC464, GetFirmware(0x4000, "BASIC1-0ROM"), RomData.ROMChipType.Upper, 0)); _machine.InitROM(roms64.ToArray()); break; case MachineType.CPC6128: _machine = new CPC6128(this, _cpu, files, autoTape, bType); var roms128 = new List <RomData>(); roms128.Add(RomData.InitROM(MachineType.CPC6128, GetFirmware(0x4000, "OS6128ROM"), RomData.ROMChipType.Lower)); roms128.Add(RomData.InitROM(MachineType.CPC6128, GetFirmware(0x4000, "BASIC1-1ROM"), RomData.ROMChipType.Upper, 0)); roms128.Add(RomData.InitROM(MachineType.CPC6128, GetFirmware(0x4000, "AMSDOS0-5ROM"), RomData.ROMChipType.Upper, 7)); _machine.InitROM(roms128.ToArray()); break; } }
/// <summary> /// Initialization routine /// </summary> public void Init(CPCBase machine) { _machine = machine; FDD_Init(); TimingInit(); Reset(); }
public CRTDevice(CPCBase machine) { _machine = machine; CurrentLine = new ScanLine(this); CRCT.AttachHSYNCCallback(OnHSYNC); CRCT.AttachVSYNCCallback(OnVSYNC); }
//private int _clockCyclesPerFrame; //private int _cyclesPerSample; #endregion #region Construction & Initialization /// <summary> /// Main constructor /// </summary> public AY38912(CPCBase machine) { _machine = machine; //_blipL.SetRates(1000000, 44100); //_blipL.SetRates((_machine.GateArray.FrameLength * 50) / 4, 44100); //_blipR.SetRates(1000000, 44100); //_blipR.SetRates((_machine.GateArray.FrameLength * 50) / 4, 44100); }
public AmstradGateArray(CPCBase machine, GateArrayType chipType) { _machine = machine; ChipType = chipType; //PenColours = new int[17]; borderType = _machine.CPC.SyncSettings.BorderType; SetupScreenSize(); //Reset(); CRCT.AttachHSYNCCallback(OnHSYNC); CRCT.AttachVSYNCCallback(OnVSYNC); CurrentLine = new CharacterLine(); InitByteLookup(); CalculateNextScreenMemory(); }
public StandardKeyboard(CPCBase machine) { _machine = machine; //_machine.AYDevice.PortA_IN_CallBack = INCallback; //_machine.AYDevice.PortA_OUT_CallBack = OUTCallback; // scancode rows, ascending (Bit0 - Bit7) KeyboardMatrix = new string[] { // 0x40 "Key CURUP", "Key CURRIGHT", "Key CURDOWN", "Key NUM9", "Key NUM6", "Key NUM3", "Key ENTER", "Key NUMPERIOD", // 0x41 "Key CURLEFT", "Key COPY", "Key NUM7", "Key NUM8", "Key NUM5", "Key NUM1", "Key NUM2", "Key NUM0", // 0x42 "Key CLR", "Key LeftBracket", "Key RETURN", "Key RightBracket", "Key NUM4", "Key SHIFT", "Key BackSlash", "Key CONTROL", // 0x43 "Key Hat", "Key Dash", "Key @", "Key P", "Key SemiColon", "Key Colon", "Key ForwardSlash", "Key Period", // 0x44 "Key 0", "Key 9", "Key O", "Key I", "Key L", "Key K", "Key M", "Key Comma", // 0x45 "Key 8", "Key 7", "Key U", "Key Y", "Key H", "Key J", "Key N", "Key SPACE", // 0x46 "Key 6", "Key 5", "Key R", "Key T", "Key G", "Key F", "Key B", "Key V", // 0x47 "Key 4", "Key 3", "Key E", "Key W", "Key S", "Key D", "Key C", "Key X", // 0x48 "Key 1", "Key 2", "Key ESC", "Key Q", "Key TAB", "Key A", "Key CAPSLOCK", "Key Z", // 0x49 "P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 Fire1", "P1 Fire2", "P1 Fire3", "Key DEL", }; // keystatus array to match the matrix KeyStatus = new bool[8 * 10]; // nonmatrix keys (anything that hasnt already been taken) var nonMatrix = new List <string>(); foreach (var key in _machine.CPC.AmstradCPCControllerDefinition.BoolButtons) { if (!KeyboardMatrix.Any(s => s == key)) { nonMatrix.Add(key); } } NonMatrixKeys = nonMatrix.ToArray(); }
/// <summary> /// Initializes the datacorder device /// </summary> public void Init(CPCBase machine) { _machine = machine; }
public PPI_8255(CPCBase machine) { _machine = machine; Reset(); }
public CRCT_6845(CRCTType chipType, CPCBase machine) { _machine = machine; ChipType = chipType; Reset(); }
public Beeper(CPCBase machine) { _machine = machine; }