Exemple #1
0
        /// <summary>
        /// Load the RDS and RSC ROM images from disk.
        /// There is no error or sanity checking done here (yet).  If those files
        /// are missing or corrupt, hilarity will ensue.
        /// </summary>
        private void LoadRasterOpROMs()
        {
            // RDS is a lookup table with a 9-bit index, returning a CombinerFlag
            FileStream fs = new FileStream(Paths.BuildPROMPath("rds00emu.rom"), FileMode.Open);

            for (int i = 0; i < 512; i++)
            {
                _rdsTable[i] = (CombinerFlags)fs.ReadByte();
            }
            fs.Close();

#if TRACING_ENABLED
            if (Trace.TraceOn)
            {
                Trace.Log(LogType.EmuState, "Initialized RDS ROM lookup table.");
            }
#endif

            // RSC is a lookup table with an 7-bit index, returning an EdgeStrategy
            fs = new FileStream(Paths.BuildPROMPath("rsc03emu.rom"), FileMode.Open);

            for (int i = 0; i < 128; i++)
            {
                _rscTable[i] = (EdgeStrategy)fs.ReadByte();
            }
            fs.Close();

#if TRACING_ENABLED
            if (Trace.TraceOn)
            {
                Trace.Log(LogType.EmuState, "Initialized RSC ROM lookup table.");
            }
#endif
        }
Exemple #2
0
        /// <summary>
        /// Load the BKM16 ROM image from disk.
        /// </summary>
        private void LoadBookmarkROM()
        {
            // BKM is a lookup table with an 8-bit index, returning an 8-bit value
            FileStream fs = new FileStream(Paths.BuildPROMPath("bkm16emu.rom"), FileMode.Open);

            for (int i = 0; i < 256; i++)
            {
                // Split the result byte into fields once, rather than on every lookup :-)
                _bkmTable[i] = new BookmarkEntry((byte)fs.ReadByte());
            }
            fs.Close();

#if TRACING_ENABLED
            if (Trace.TraceOn)
            {
                Trace.Log(LogType.EmuState, "Initialized BKM ROM lookup table.");
            }
#endif
        }
Exemple #3
0
 public Z80Debugger()
 {
     LoadZ80Source(Paths.BuildPROMPath("pz80.lst"));
 }