public void GenerateBaudRate(object sender, TimerExpirationEventArgs e) { Timer timer = (Timer)sender; // bool fireInterrupt = comLynx.GenerateBaudRate(); bool fireInterrupt = ComLynx.GenerateBaudPulse(); if (fireInterrupt) { // Update interrupt status timerInterruptStatusRegister |= e.InterruptMask; // Trigger a maskable interrupt device.Cpu.SignalInterrupt(InterruptType.Irq); } }
public void Reset() { ComLynx.Reset(); Initialize(); // SDONEACK = 0 "(not acked)" timerInterruptMask = timerInterruptStatusRegister = 0; IODIR = new ParallelDataDirection(0x00); // "reset = 0,0.0.0,0,0,0,0" IODAT = new ParallelData(0x00); SYSCTL1 = new SystemControlBits1(0x02); // "reset x,x,x,x,x,x,1,0" DISPCTL = new DisplayControlBits(0x00); // "reset = 0" AUDIN = new AudioIn(0x80); // "reset = b7,0,0,0,0,0,0,0" // "Audio are reset to 0, all are read/write" // TODO: Reset audio registers to zero Stereo = new StereoConnection(); }
public void Initialize() { InitializeTimers(); if (SoundEnabled) { InitializeAudioChannels(); } // TODO: Clean this hack up and use a decent way to get at the LCD screen memory LcdScreenDma = ((LynxHandheld)device).LcdScreenDma; // TODO: Another hack to avoid rendering when timer 2 has only just started currentLcdDmaCounter = -1; VideoMemoryDma = device.Ram.GetDirectAccess(); unchecked { for (int index = 0; index <= 0x0F; index++) { ArgbColorMap[index] = 0xFF000000; } } ComLynx.Initialize(); }