示例#1
0
        public CDRom()
        {
            m_BRAM       = new SaveMemoryBank();
            m_Ram        = new RamBank[32];
            m_CDInserted = false;
            m_ADPCM      = new ADPCM();

            for (int i = 0; i < 32; i++)
            {
                m_Ram[i] = new RamBank();
            }

            m_Playing     = null;
            m_AudioPaused = false;
            m_PlayChunk   = new byte[0x20000];

            m_FadeCurrent = 1.0f;
            m_FadeDown    = false;
            m_FadeUp      = false;
            m_FadeStep    = 0.0f;

            m_DataReady        = false;
            m_DataTransferDone = false;

            m_CDRomState = CDState.RESET;
        }
示例#2
0
        public TurboGraphics()
        {
            MemoryBank nullMemory = new MemoryBank();
            RamBank    memory     = new RamBank();

            m_CDRom  = new CDRom();
            m_IOPage = new IOPage(this, m_CDRom);

            // We have 256 ram banks to work with
            m_BankList = new MemoryBank[0x100];

            for (int i = 0; i < 0x100; i++)
            {
                m_BankList[i] = nullMemory;
            }

            m_BankList[0xF8] = memory;
            m_BankList[0xF9] = memory;
            m_BankList[0xFA] = memory;
            m_BankList[0xFB] = memory;

            // CD-ROM BRAM
            m_BankList[0xF7] = m_CDRom.GetSaveMemory();

            // CD-ROM ram sub system
            m_BankList[0x80] = m_CDRom.GetRam(0);
            m_BankList[0x81] = m_CDRom.GetRam(1);
            m_BankList[0x82] = m_CDRom.GetRam(2);
            m_BankList[0x83] = m_CDRom.GetRam(3);
            m_BankList[0x84] = m_CDRom.GetRam(4);
            m_BankList[0x85] = m_CDRom.GetRam(5);
            m_BankList[0x86] = m_CDRom.GetRam(6);
            m_BankList[0x87] = m_CDRom.GetRam(7);

            m_BankList[0xFF] = m_IOPage;
        }