public TVCMemory(TVComputer in_tvc) { // load configuration m_settings = SettingsFile.Default.GetSettings <TVCConfigurationSettings>(); m_tvc = in_tvc; m_page_reader = new PageReader[PageCount]; m_page_writer = new PageWriter[PageCount]; // reserve space for memories m_mem_sys = new byte[SysMemLength]; m_mem_ext = new byte[ExtMemLength]; m_mem_iomem = new byte[IOCardCount][]; for (int i = 0; i < IOCardCount; i++) { m_mem_iomem[i] = new byte[IOMemSize]; } m_mem_user = new byte[PageCount * PageLength]; m_mem_video = new byte[VideoPageCount * PageLength]; // register port handlers m_tvc.Ports.AddPortWriter(0x02, PortWrite02H); m_tvc.Ports.AddPortWriter(0x03, PortWrite03H); m_tvc.Ports.AddPortReset(0x02, PortReset02H); m_tvc.Ports.AddPortReset(0x03, PortReset03H); LoadROM(); }
/// <summary> /// Creates TVC keyboard emulation /// </summary> /// <param name="in_tvc">TVC hardware which owns this keyboard</param> public TVCKeyboard(TVComputer in_tvc) { m_tvc = in_tvc; // init matrix m_keyboard_matrix = new byte[KeyboardRowCount]; for (int i = 0; i < m_keyboard_matrix.Length; i++) { m_keyboard_matrix[i] = 0xff; } m_joystick1_state = 0xff; m_joystick2_state = 0xff; // add port access handlers m_tvc.Ports.AddPortWriter(0x03, PortWrite03H); m_tvc.Ports.AddPortReader(0x58, PortRead58H); // setup injection service m_keyboard_injection_pos = -1; m_keyboard_injection_rate = m_tvc.MillisecToCPUTicks(KeyboardInjectionRate); // setup joystick JoyStick1 = new TVCJoystick(); JoyStick2 = new TVCJoystick(); // apply settings bool dummy = false; SettingsChanged(ref dummy); }
public TVCVideo(TVComputer in_tvc) { m_tvc = in_tvc; BlackAndWhite = false; m_context = SynchronizationContext.Current; // color tables init m_current_graphics16_colors = new uint[128]; m_current_graphics16_dim_colors = new uint[128]; m_current_colors = new uint[TVCColors.Length]; FillColorCache(); m_6845_registers = new byte[MC6845RegisterCount]; m_port_palette = new byte[PaletterColorCount]; m_tvc.Ports.AddPortWriter(0x00, PortWrite00H); m_tvc.Ports.AddPortWriter(0x06, PortWrite06H); m_tvc.Ports.AddPortWriter(0x60, PortWrite60H); m_tvc.Ports.AddPortWriter(0x61, PortWrite61H); m_tvc.Ports.AddPortWriter(0x62, PortWrite62H); m_tvc.Ports.AddPortWriter(0x63, PortWrite63H); m_tvc.Ports.AddPortWriter(0x70, PortWrite70H); m_tvc.Ports.AddPortWriter(0x71, PortWrite71H); m_frame_ready_event_param = new FrameReadyEventparam(); AllocateFrameBuffer(640, 576); }
public TVCInterrupt(TVComputer in_tvc) { m_tvc = in_tvc; m_tvc.Ports.AddPortWriter(0x07, PortWrite07H); m_tvc.Ports.AddPortReader(0x59, PortRead59H); }
/// <summary> /// Derfault contructor /// </summary> /// <param name="in_tvc">Parent TVC class</param> public TVCSound(TVComputer in_tvc) { m_tvc = in_tvc; m_tvc.Ports.AddPortWriter(0x04, PortWrite04H); m_tvc.Ports.AddPortWriter(0x05, PortWrite05H); m_tvc.Ports.AddPortWriter(0x06, PortWrite06H); m_tvc.Ports.AddPortReader(0x5B, PortRead5BH); m_tvc.Ports.AddPortReset(0x05, PortReset05H); m_tvc.Ports.AddPortReset(0x06, PortReset06H); m_sample_rate = (int)TVCManagers.Default.AudioManager.SampleRate; m_counter_increment = m_tvc.CPUClock / m_sample_rate; m_counter_increment_remainder = m_tvc.CPUClock % m_sample_rate; m_audio_channel_index = TVCManagers.Default.AudioManager.OpenChannel(RenderAudio); }
public TVCTape(TVComputer in_tvc) { }