add ui to switch to Atari7800Hawk, still not useable by humans, needs gamedb stuff

This commit is contained in:
adelikat 2017-05-27 08:56:25 -05:00
parent 47758a519d
commit 8de4e7bff9
7 changed files with 3508 additions and 3458 deletions

View File

@ -7,6 +7,7 @@ using BizHawk.Common;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores; using BizHawk.Emulation.Cores;
using BizHawk.Emulation.Cores.Libretro; using BizHawk.Emulation.Cores.Libretro;
using BizHawk.Emulation.Cores.Atari.A7800Hawk;
using BizHawk.Emulation.Cores.Atari.Atari7800; using BizHawk.Emulation.Cores.Atari.Atari7800;
using BizHawk.Emulation.Cores.Calculators; using BizHawk.Emulation.Cores.Calculators;
using BizHawk.Emulation.Cores.Computers.AppleII; using BizHawk.Emulation.Cores.Computers.AppleII;
@ -835,7 +836,10 @@ namespace BizHawk.Client.Common
break; break;
case "A78": case "A78":
var gamedbpath = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "EMU7800.csv"); var gamedbpath = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "EMU7800.csv");
nextEmulator = new Atari7800(nextComm, game, rom.RomData, gamedbpath);
nextEmulator = Global.Config.A78_UseEmu7800
? nextEmulator = new Atari7800(nextComm, game, rom.RomData, gamedbpath)
: nextEmulator = new A7800Hawk(nextComm, game, rom.RomData, gamedbpath);
break; break;
case "C64": case "C64":
var c64 = new C64(nextComm, Enumerable.Repeat(rom.RomData, 1), GetCoreSettings<C64>(), GetCoreSyncSettings<C64>()); var c64 = new C64(nextComm, Enumerable.Repeat(rom.RomData, 1), GetCoreSettings<C64>(), GetCoreSyncSettings<C64>());

View File

@ -537,6 +537,7 @@ namespace BizHawk.Client.Common
public bool NES_InQuickNES = true; public bool NES_InQuickNES = true;
public bool SNES_InSnes9x = false; public bool SNES_InSnes9x = false;
public bool GBA_UsemGBA = false; public bool GBA_UsemGBA = false;
public bool A78_UseEmu7800 = true;
public bool CoreForcingViaGameDB = true; public bool CoreForcingViaGameDB = true;
public string LibretroCore; public string LibretroCore;
} }

View File

@ -7,6 +7,8 @@ using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Cores.Nintendo.SNES9X; using BizHawk.Emulation.Cores.Nintendo.SNES9X;
using BizHawk.Emulation.Cores.Nintendo.SNES; using BizHawk.Emulation.Cores.Nintendo.SNES;
using BizHawk.Emulation.Cores.Nintendo.GBA; using BizHawk.Emulation.Cores.Nintendo.GBA;
using BizHawk.Emulation.Cores.Atari.A7800Hawk;
using BizHawk.Emulation.Cores.Atari.Atari7800;
namespace BizHawk.Client.Common namespace BizHawk.Client.Common
{ {
@ -463,6 +465,7 @@ namespace BizHawk.Client.Common
public bool? PreviousNES_InQuickNES { get; set; } public bool? PreviousNES_InQuickNES { get; set; }
public bool? PreviousSNES_InSnes9x { get; set; } public bool? PreviousSNES_InSnes9x { get; set; }
public bool? PreviousGBA_UsemGBA { get; set; } public bool? PreviousGBA_UsemGBA { get; set; }
public bool? PreviousA78_UseEmu7800 { get; set; }
public void QueueNewMovie(IMovie movie, bool record, IEmulator emulator) public void QueueNewMovie(IMovie movie, bool record, IEmulator emulator)
{ {
@ -530,6 +533,22 @@ namespace BizHawk.Client.Common
Global.Config.GBA_UsemGBA = false; Global.Config.GBA_UsemGBA = false;
} }
} }
else if (!record && emulator.SystemId == "A78") // meh, copy pasta one more time, last time, I promise
{
var atari7800HawkName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(A7800Hawk), typeof(CoreAttributes))).CoreName;
var emu7800HawkName = ((CoreAttributes)Attribute.GetCustomAttribute(typeof(Atari7800), typeof(CoreAttributes))).CoreName;
if (movie.Core == atari7800HawkName)
{
PreviousA78_UseEmu7800 = Global.Config.A78_UseEmu7800;
Global.Config.A78_UseEmu7800 = true;
}
else if (movie.Core == emu7800HawkName)
{
PreviousA78_UseEmu7800 = Global.Config.A78_UseEmu7800;
Global.Config.A78_UseEmu7800 = false;
}
}
if (record) // This is a hack really, we need to set the movie to its propert state so that it will be considered active later if (record) // This is a hack really, we need to set the movie to its propert state so that it will be considered active later
{ {

View File

@ -20,6 +20,7 @@ namespace BizHawk.Client.Common
bool? PreviousNES_InQuickNES { get; set; } bool? PreviousNES_InQuickNES { get; set; }
bool? PreviousSNES_InSnes9x { get; set; } bool? PreviousSNES_InSnes9x { get; set; }
bool? PreviousGBA_UsemGBA { get; set; } bool? PreviousGBA_UsemGBA { get; set; }
bool? PreviousA78_UseEmu7800 { get; set; }
void HandleMovieOnFrameLoop(); void HandleMovieOnFrameLoop();
void HandleMovieAfterFrameLoop(); void HandleMovieAfterFrameLoop();

View File

@ -436,6 +436,7 @@
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator(); this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timerMouseIdle = new System.Windows.Forms.Timer(this.components); this.timerMouseIdle = new System.Windows.Forms.Timer(this.components);
this.Atari7800WithEmu7800MenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainformMenu.SuspendLayout(); this.MainformMenu.SuspendLayout();
this.MainStatusBar.SuspendLayout(); this.MainStatusBar.SuspendLayout();
this.MainFormContextMenu.SuspendLayout(); this.MainFormContextMenu.SuspendLayout();
@ -1794,6 +1795,7 @@
this.NesInQuickNESMenuItem, this.NesInQuickNESMenuItem,
this.CoreSNESSubMenu, this.CoreSNESSubMenu,
this.gBAWithMGBAToolStripMenuItem, this.gBAWithMGBAToolStripMenuItem,
this.Atari7800WithEmu7800MenuItem,
this.toolStripMenuItem16, this.toolStripMenuItem16,
this.allowGameDBCoreOverridesToolStripMenuItem, this.allowGameDBCoreOverridesToolStripMenuItem,
this.toolStripSeparator8, this.toolStripSeparator8,
@ -3861,6 +3863,13 @@
this.timerMouseIdle.Interval = 2000; this.timerMouseIdle.Interval = 2000;
this.timerMouseIdle.Tick += new System.EventHandler(this.TimerMouseIdle_Tick); this.timerMouseIdle.Tick += new System.EventHandler(this.TimerMouseIdle_Tick);
// //
// Atari7800WithEmu7800MenuItem
//
this.Atari7800WithEmu7800MenuItem.Name = "Atari7800WithEmu7800MenuItem";
this.Atari7800WithEmu7800MenuItem.Size = new System.Drawing.Size(239, 22);
this.Atari7800WithEmu7800MenuItem.Text = "Atari 7800 with Emu7800";
this.Atari7800WithEmu7800MenuItem.Click += new System.EventHandler(this.Atari7800WithEmu7800MenuItem_Click);
//
// MainForm // MainForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@ -4308,5 +4317,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator35; private System.Windows.Forms.ToolStripSeparator toolStripSeparator35;
private System.Windows.Forms.ToolStripMenuItem C64DisksSubMenu; private System.Windows.Forms.ToolStripMenuItem C64DisksSubMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator36; private System.Windows.Forms.ToolStripSeparator toolStripSeparator36;
private System.Windows.Forms.ToolStripMenuItem Atari7800WithEmu7800MenuItem;
} }
} }

View File

@ -5,9 +5,10 @@ using System.Windows.Forms;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions; using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Emulation.Cores.Atari.A7800Hawk;
using BizHawk.Emulation.Cores.Atari.Atari7800;
using BizHawk.Emulation.Cores.Calculators; using BizHawk.Emulation.Cores.Calculators;
using BizHawk.Emulation.Cores.ColecoVision; using BizHawk.Emulation.Cores.ColecoVision;
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
using BizHawk.Emulation.Cores.Nintendo.NES; using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Cores.Nintendo.N64; using BizHawk.Emulation.Cores.Nintendo.N64;
using BizHawk.Emulation.Cores.Nintendo.SNES; using BizHawk.Emulation.Cores.Nintendo.SNES;
@ -1213,6 +1214,7 @@ namespace BizHawk.Client.EmuHawk
GBInSGBMenuItem.Checked = Global.Config.GB_AsSGB; GBInSGBMenuItem.Checked = Global.Config.GB_AsSGB;
NesInQuickNESMenuItem.Checked = Global.Config.NES_InQuickNES; NesInQuickNESMenuItem.Checked = Global.Config.NES_InQuickNES;
gBAWithMGBAToolStripMenuItem.Checked = Global.Config.GBA_UsemGBA; gBAWithMGBAToolStripMenuItem.Checked = Global.Config.GBA_UsemGBA;
Atari7800WithEmu7800MenuItem.Checked = Global.Config.A78_UseEmu7800;
allowGameDBCoreOverridesToolStripMenuItem.Checked = Global.Config.CoreForcingViaGameDB; allowGameDBCoreOverridesToolStripMenuItem.Checked = Global.Config.CoreForcingViaGameDB;
} }
@ -1270,6 +1272,15 @@ namespace BizHawk.Client.EmuHawk
} }
} }
private void Atari7800WithEmu7800MenuItem_Click(object sender, EventArgs e)
{
Global.Config.A78_UseEmu7800 ^= true;
if (Emulator is A7800Hawk || Emulator is Atari7800)
{
FlagNeedsReboot();
}
}
private void AllowGameDBCoreOverridesToolStripMenuItem_Click(object sender, EventArgs e) private void AllowGameDBCoreOverridesToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Global.Config.CoreForcingViaGameDB ^= true; Global.Config.CoreForcingViaGameDB ^= true;

View File

@ -42,6 +42,10 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public A7800Hawk(CoreComm comm, GameInfo game, byte[] rom, string gameDbFn) public A7800Hawk(CoreComm comm, GameInfo game, byte[] rom, string gameDbFn)
{ {
var ser = new BasicServiceProvider(this); var ser = new BasicServiceProvider(this);
maria = new Maria();
tia = new TIA();
ser.Register<IVideoProvider>(maria); ser.Register<IVideoProvider>(maria);
ser.Register<ISoundProvider>(tia); ser.Register<ISoundProvider>(tia);
ServiceProvider = ser; ServiceProvider = ser;