예제 #1
0
 private void GBAGPUView_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (gba != null)
     {
         gba.SetScanlineCallback(null, null);
         gba = null;
     }
 }
예제 #2
0
        public PPU(GBA gba, ushort[] display, IORAMSection IO)
        {
            this.gba     = gba;
            this.IO      = IO;
            this.Display = display;

            this.ResetBGScanlines(0, 1, 2, 3);
            this.ResetOBJScanlines();
        }
예제 #3
0
 public void Restart()
 {
     gba = Global.Emulator as GBA;
     if (gba != null)
     {
         gba.GetGPUMemoryAreas(out vram, out palram, out oam, out mmio);
     }
     else
     {
         if (Visible)
         {
             Close();
         }
     }
 }
예제 #4
0
        public static void Main(string[] args)
        {
            Gba = new GBA(AudioReady);

            byte[] bios = System.IO.File.ReadAllBytes("roms/GBA.BIOS");
            bios.CopyTo(Gba.Mem.Bios, 0);

            byte[] rom = System.IO.File.ReadAllBytes("roms/armwrestler-gba-fixed.gba");
            rom.CopyTo(Gba.Mem.Rom, 0);

            using (Game game = new Game(1600, 900, "PZ GBA", Gba))
            {
                //Run takes a double, which is how many frames per second it should strive to reach.
                //You can leave that out and it'll just update as fast as the hardware will allow it.
                game.VSync = OpenTK.VSyncMode.On;
                game.Run(60.0, 0.0);
            }

            SetupSDL();
        }
예제 #5
0
파일: CPU.cs 프로젝트: DenSinH/GBAC-
        public ARM7TDMI(GBA gba, Scheduler.Scheduler scheduler)
        {
            this.gba      = gba;
            this.Pipeline = new cPipeline(this);

            this.InitARM();
            this.InitTHUMB();
            this.InitTimers(scheduler);

            // IO requires bus to be initialized
            this.bus = new BUS(this);
            this.IO  = new IORAMSection();

            // DMAChannels require bus AND IO to be initialized
            this.DMAChannels[0] = new DMAChannel(this, 0);
            this.DMAChannels[1] = new DMAChannel(this, 1);
            this.DMAChannels[2] = new DMAChannel(this, 2);
            this.DMAChannels[3] = new DMAChannel(this, 3);

            // mem requires IO AND DMAChannels to be initialized
            this.mem = new MEM(this);

            this.SystemBank     = new uint[16];
            this.FIQBank        = new uint[16];
            this.SupervisorBank = new uint[16];
            // this.AbortBank      = new uint[16];
            this.IRQBank = new uint[16];
            // this.UndefinedBank  = new uint[16];
            this.state = State.ARM;

            // need banked registers for CPSR initialization
            this.CPSR = 0x0000005F;

            this.PipelineFlush();
            this.PC += 4;
        }
예제 #6
0
 public ToonStats()
 {
     ht = new HT(); mf = new MF(); nego = new Nego(); traya = new Traya(); en = new EN(); padme = new Padme(); jkr = new JKR(); grievous = new Grievous(); bsf = new BSF(); bossk = new Bossk(); gba = new GBA(); mal = new Malevolence(); dr = new DR(); dm = new DM();
 }
예제 #7
0
 public Game(int width, int height, string title, GBA gba) : base(width, height, GraphicsMode.Default, title)
 {
     Gba = gba;
 }
예제 #8
0
 public override bool IsPlatformMatch(byte[] rom)
 {
     return(GBA.VerifyLogo(rom, 0));
 }