public Emulator() { CPU = new YCPU(); CPU.BUS.Reset(); CPU.BUS.AddDevice(new GraphicsAdapter(CPU.BUS), 1); CPU.BUS.AddDevice(new KeyboardDevice(CPU.BUS), 2); CPU.BUS.SetRAM(0x20000); CPU.BUS.SetROM(0x04000); CPU.Interrupt_Reset(); }
private string[] Disassemble(BinaryReader reader) { YCPU ycpu = new YCPU(); byte[] data = new byte[reader.BaseStream.Length]; reader.BaseStream.Read(data, 0, data.Length); ycpu.BUS.FillROM(data); string[] disassembled; disassembled = ycpu.Disassemble(0x0000, 32000, false); return disassembled; }
// =================================================================================================== // Emulator Functions // =================================================================================================== public YBUS(YCPU cpu) { CPU = cpu; }