public Z80System() { // Initialize components clock = new _Clock(3500000L); cpu = new _Z80CPU(); memory = new _Memory(65536); // Connect buses cpu.Address.ConnectTo(addressBus); cpu.Data.ConnectTo(dataBus); memory.Address.ConnectTo(addressBus); memory.Data.ConnectTo(dataBus); // Connect individual PINs ((_Clock)clock).ConnectTo(cpu); ((_Z80CPU)cpu).ConnectTo(clock, memory); ((_Memory)memory).ConnectTo(cpu); }
public ULATestSystem() { // -- Initialize components -- PixelClock = new _Clock(Clock.FREQ_3_5MHZ); VideoMemory = new _Memory(32768); ULA = new _ULA(); Screen = new _Screen(); // -- Initialize and connect system buses -- Bus <ushort> videoAddressBus = new Bus <ushort>(); Bus <byte> videoDataBus = new Bus <byte>(); VideoMemory.Address.ConnectTo(videoAddressBus); VideoMemory.Data.ConnectTo(videoDataBus); ULA.VideoAddress.ConnectTo(videoAddressBus); ULA.VideoData.ConnectTo(videoDataBus); // Unused CPU buses Bus <ushort> cpuAddressBus = new Bus <ushort>(); Bus <byte> cpuDataBus = new Bus <byte>(); ULA.Address.ConnectTo(cpuAddressBus); ULA.Data.ConnectTo(cpuDataBus); // Connect ULA analog video signal to screen ULA.ColorSignal.ConnectTo(Screen.ColorSignal); // Connect tape recorder sound output to ULA AnalogOutputPin <byte> noSound = new AnalogOutputPin <byte>(0); noSound.ConnectTo(ULA.TapeInputSignal); // -- Connect individual PINs -- ((_Clock)PixelClock).ConnectTo(ULA, Screen); ((_Memory)VideoMemory).ConnectTo(ULA); ((_ULA)ULA).ConnectTo(PixelClock, VideoMemory, Screen); ((_Screen)Screen).ConnectTo(ULA); }
public ULATestSystem() { // -- Initialize components -- PixelClock = new _Clock(Clock.FREQ_3_5MHZ); VideoMemory = new _Memory(32768); ULA = new _ULA(); Screen = new _Screen(); // -- Initialize and connect system buses -- Bus<ushort> videoAddressBus = new Bus<ushort>(); Bus<byte> videoDataBus = new Bus<byte>(); VideoMemory.Address.ConnectTo(videoAddressBus); VideoMemory.Data.ConnectTo(videoDataBus); ULA.VideoAddress.ConnectTo(videoAddressBus); ULA.VideoData.ConnectTo(videoDataBus); // Unused CPU buses Bus<ushort> cpuAddressBus = new Bus<ushort>(); Bus<byte> cpuDataBus = new Bus<byte>(); ULA.Address.ConnectTo(cpuAddressBus); ULA.Data.ConnectTo(cpuDataBus); // Connect ULA analog video signal to screen ULA.ColorSignal.ConnectTo(Screen.ColorSignal); // Connect tape recorder sound output to ULA AnalogOutputPin<byte> noSound = new AnalogOutputPin<byte>(0); noSound.ConnectTo(ULA.TapeInputSignal); // -- Connect individual PINs -- ((_Clock)PixelClock).ConnectTo(ULA, Screen); ((_Memory)VideoMemory).ConnectTo(ULA); ((_ULA)ULA).ConnectTo(PixelClock, VideoMemory, Screen); ((_Screen)Screen).ConnectTo(ULA); }