Example #1
0
 public JoypadRegister(Joypad pad, Memory memory, UInt32 address) :
     base(memory, address, true, false)
 {
     this.pad = pad;
 }
Example #2
0
        public void PowerOn()
        {
            PoweredOn = true;

            this.Bios = new Bios(this, "../../../../GBA.BIOS");

            //this.Rom = new Rom("../../../../roms/TestRoms/armwrestler.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/suite.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/arm.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/hello.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/irq_demo.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/OrganHarvester/if_ack.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/tmr_demo.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/brin_demo.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/obj_demo.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/obj_aff.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/sbb_aff.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/win_demo.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/dma_demo.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/m3_demo.gba");
            //this.Rom = new Rom("../../../../roms/TestRoms/m7_demo.gba");

            //this.Rom = new Rom("../../../../roms/Super Dodgeball Advance.gba");
            this.Rom = new Rom("../../../../roms/Kirby.gba");
            //this.Rom = new Rom("../../../../roms/Metal Slug Advance (U).gba");
            //this.Rom = new Rom("../../../../roms/Super Mario Advance 2 - Super Mario World (U) [!].gba");
            //this.Rom = new Rom("../../../../roms/Legend of Zelda, The - The Minish Cap (U).gba");
            //this.Rom = new Rom("../../../../roms/Legend of Zelda, The - A Link To The Past Four Swords.gba");
            //this.Rom = new Rom("../../../../roms/Pokemon Mystery Dungeon - Red Rescue Team (U).gba");
            //this.Rom = new Rom("../../../../roms/Teenage Mutant Ninja Turtles.gba");
            //this.Rom = new Rom("../../../../roms/Barbie Horse Adventures.gba");
            //this.Rom = new Rom("../../../../roms/Pokemon Pinball.gba");
            //this.Rom = new Rom("../../../../roms/Contra Advance - The Alien Wars Ex.gba");
            //this.Rom = new Rom("../../../../roms/Castlevania - Aria of Sorrow.GBA");
            //this.Rom = new Rom("../../../../roms/Castlevania - Harmony Of Dissonance.GBA");
            //this.Rom = new Rom("../../../../roms/Baseball Advance.GBA");
            //this.Rom = new Rom("../../../../roms/Donkey Kong Country 3.gba");
            //this.Rom = new Rom("../../../../roms/Final Fantasy - Tactics Advanced.GBA");
            //this.Rom = new Rom("../../../../roms/Mario Golf - Advance Tour.gba");
            //this.Rom = new Rom("../../../../roms/Yoshi's Island - Super Mario Advance 3.gba");
            //this.Rom = new Rom("../../../../roms/Fire Emblem.gba");
            //this.Rom = new Rom("../../../../roms/Darius R.GBA");
            //this.Rom = new Rom("../../../../roms/Max Payne Advance.gba");
            //this.Rom = new Rom("../../../../roms/Mario & Luigi - Superstar Saga.gba");
            //this.Rom = new Rom("../../../../roms/Mario Kart Super Circuit (U).gba");
            //this.Rom = new Rom("../../../../roms/F-Zero - Maximum Velocity.gba");
            //this.Rom = new Rom("../../../../roms/Konami Krazy Racers.gba");
            //this.Rom = new Rom("../../../../roms/Sega Rally Championship.gba");

            // Intro uses OBJ Win...
            //this.Rom = new Rom("../../../../roms/Pokemon - Emerald Version (U).gba");

            //this.Rom = new Rom("../../../../roms/Advance Wars.gba");
            //this.Rom = new Rom("../../../../roms/Advanced Wars 2 - Black Hole Rising.gba");


            //this.Rom = new Rom("../../../../roms/");


            this.Memory        = new Memory(this);
            this.Cpu           = new Cpu(this);
            this.Interrupts    = new Interrupts(this);
            this.Timers        = new Timers(this);
            this.LcdController = new LcdController(this);
            this.Joypad        = new Joypad(this);
            this.Dma           = new DmaChannel[4];
            for (int i = 0; i < 4; i++)
            {
                Dma[i] = new DmaChannel(this, i);
                Dma[i].Reset();
            }
            this.Scheduler = new Scheduler(this);

            EmulatorTimer.Reset();
            EmulatorTimer.Start();

            Cpu.Reset();
            LcdController.Reset();
            Joypad.Reset();
        }