Beispiel #1
0
        public void ShouldRejectInvalidData()
        {
            TestContext.WriteLine("romParser should reject invalid data");

            var romData = new RomBinary {
                u06 = new byte[7]
            };

            var result = Assert.Throws <Exception>(() => RomHelper.parse(romData));

            Assert.That(result.Message, Is.EqualTo("INVALID_ROM_SIZE"));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            try
            {
                if (args.Length < 1)
                {
                    throw new ArgumentException("USAGE: Tracer <rom file> [<steps>]");
                }

                var u06 = File.ReadAllBytes(args[0]);

                var romObject = new RomBinary
                {
                    u06 = u06
                };

                var metaData = new RomMetaData
                {
                    skipWpcRomCheck = true,
                    features        = new string[]
                    {
                        "wpcDcs",
                        "securityPic",
                        "wpc95",
                    },
                };

                if (args.Length > 1)
                {
                    MAXSTEPS = uint.Parse(args[1]);
                }

                var wpcSystem = Emulator.initVMwithRom(romObject, metaData);

                wpcSystem.reset();
                wpcSystem.start();

                Trace(wpcSystem);
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            try
            {
                if (args.Length < 1)
                {
                    throw new ArgumentException("USAGE: Example <rom file>");
                }

                var u06 = File.ReadAllBytes(args[0]);

                var romObject = new RomBinary
                {
                    u06 = u06
                };

                var metaData = new RomMetaData
                {
                    skipWpcRomCheck = false,
                    features        = new string[]
                    {
                        "securityPic",
                        "wpc95"
                    },
                };

                var wpcSystem = Emulator.initVMwithRom(romObject, metaData);

                wpcSystem.reset();
                wpcSystem.start();

                Start(wpcSystem);
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }