ColecoHawk - set up ROM loading (bind .col to Coleco), set up preliminary controller garbage in 85 places for coleco

This commit is contained in:
adelikat 2012-05-06 00:54:13 +00:00
parent 604a774118
commit 059aebec8e
6 changed files with 104 additions and 4 deletions

View File

@ -35,9 +35,9 @@ namespace BizHawk.Emulation.Consoles.Coleco
BoolButtons =
{
"P1 Up", "P1 Down", "P1 Left", "P1 Right",
"P1 B1", "P1 B2", "P1 B3", "P1 B4",
"P1 L1", "P1 L2", "P1 R1", "P1 R2",
"P1 Key1", "P1 Key2", "P1 Key3", "P1 Key4", "P1 Key5",
"P1 Key6", "P1 Key7", "P1 Key8", "P1 Key9" //adelikat: TODO: this was based on a picture, is this the right buttons?, semantics?, can there be multiple controllers?
"P1 Key6", "P1 Key7", "P1 Key8", "P1 Key9", "P1 Star", "P1 Pound" //adelikat: TODO: can there be multiple controllers?
}
};

View File

@ -138,6 +138,7 @@ namespace BizHawk
case ".SMD": Game.System = "GEN"; break;
case ".NES": Game.System = "NES"; break;
case ".A26": Game.System = "A26"; break;
case ".COL": Game.System = "COLV"; break;
}
Game.Name = Path.GetFileNameWithoutExtension(fileName).Replace('_', ' ');

View File

@ -44,6 +44,8 @@ namespace BizHawk.MultiClient
PCEAutoController[4] = new PCEControllerTemplate(false);
GameBoyAutoController = new NESControllerTemplate(false);
ColecoController = new ColecoVisionControllerTemplate(true);
}
// Directories
@ -494,6 +496,9 @@ namespace BizHawk.MultiClient
public bool Atari2600_LeftDifficulty = true;
public bool Atari2600_RightDifficulty = true;
//ColecoVision
public ColecoVisionControllerTemplate ColecoController = new ColecoVisionControllerTemplate(true);
//GameBoy Settings
public NESControllerTemplate GameBoyController = new NESControllerTemplate(true);
public NESControllerTemplate GameBoyAutoController = new NESControllerTemplate();
@ -747,6 +752,59 @@ namespace BizHawk.MultiClient
}
}
public class ColecoVisionControllerTemplate
{
public string Up = "";
public string Down = "";
public string Left = "";
public string Right = "";
public string L1 = "";
public string L2 = "";
public string R1 = "";
public string R2 = "";
public string _1 = "";
public string _2 = "";
public string _3 = "";
public string _4 = "";
public string _5 = "";
public string _6 = "";
public string _7 = "";
public string _8 = "";
public string _9 = "";
public string Star = "";
public string Pound = "";
public bool Enabled;
public ColecoVisionControllerTemplate() { }
public ColecoVisionControllerTemplate(bool defaults)
{
if (defaults)
{
Enabled = true;
Up = "UpArrow, J1 Up";
Down = "DownArrow, J1 Down";
Left = "LeftArrow, J1 Left";
Right = "RightArrow, J1 Right";
L1 = "Z, J1 B1";
L2 = "X, J1 B2";
R1 = "C, J1 B1";
R2 = "V, J1 B2";
_1 = "NumberPad1";
_2 = "NumberPad2";
_3 = "NumberPad3";
_4 = "NumberPad4";
_5 = "NumberPad5";
_6 = "NumberPad6";
_7 = "NumberPad7";
_8 = "NumberPad8";
_9 = "NumberPad9";
Pound = "NumberPadPeriod";
Star = "NumberPad0";
}
}
}
public class TI83ControllerTemplate
{
public string _0;

View File

@ -30,6 +30,7 @@ namespace BizHawk.MultiClient
public static Controller GBControls;
public static Controller Atari2600Controls;
public static Controller NullControls;
public static Controller ColecoControls;
public static CheatList CheatList;
public static AutofireController AutofireNullControls;
@ -94,6 +95,14 @@ namespace BizHawk.MultiClient
{
{"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"Button", "B"}
}
},
{
"ColecoVision Basic Controller", new Dictionary<string, string>()
{
{"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"L1", "l"}, {"L2", "L"}, {"R1", "r"}, {"R2", "R"}, //adelikat: These mnemonics are terrible but I can't think of anything better
{"Key1", "1"}, {"Key2", "2"}, {"Key3", "3"}, {"Key4", "4"}, {"Key5", "5"}, {"Key6", "6"}, {"Key7", "7"},
{"Key8", "8"}, {"Key9", "9"}, {"Star", "*"}, {"Pound", "#"}
}
}
};
@ -110,7 +119,8 @@ namespace BizHawk.MultiClient
public static readonly Dictionary<string, int> PLAYERS = new Dictionary<string, int>()
{
{"Gameboy Controller", 1}, {"Genesis 3-Button Controller", 2}, {"NES Controller", 4},
{"PC Engine Controller", 5}, {"SMS Controller", 2}, {"TI83 Controller", 1}, {"Atari 2600 Basic Controller", 2}
{"PC Engine Controller", 5}, {"SMS Controller", 2}, {"TI83 Controller", 1}, {"Atari 2600 Basic Controller", 2},
{"ColecoVision Basic Controller", 1}
};
/// <summary>

View File

@ -12,6 +12,7 @@ using BizHawk.Emulation.Consoles.TurboGrafx;
using BizHawk.Emulation.Consoles.Calculator;
using BizHawk.Emulation.Consoles.Gameboy;
using BizHawk.Emulation.Consoles.Nintendo;
using BizHawk.Emulation.Consoles.Coleco;
using BizHawk.MultiClient.tools;
using System.Collections.Generic;
@ -744,6 +745,28 @@ namespace BizHawk.MultiClient
autofireA2600Controls.BindMulti("P2 Button", Global.Config.Atari2600Controller[1].Button);
Global.AutofireAtari2600Controls = autofireA2600Controls;
var colecoControls = new Controller(ColecoVision.ColecoVisionControllerDefinition);
colecoControls.BindMulti("P1 Up", Global.Config.ColecoController.Up);
colecoControls.BindMulti("P1 Left", Global.Config.ColecoController.Left);
colecoControls.BindMulti("P1 Right", Global.Config.ColecoController.Right);
colecoControls.BindMulti("P1 Down", Global.Config.ColecoController.Down);
colecoControls.BindMulti("P1 L1", Global.Config.ColecoController.L1);
colecoControls.BindMulti("P1 L2", Global.Config.ColecoController.L2);
colecoControls.BindMulti("P1 R1", Global.Config.ColecoController.R1);
colecoControls.BindMulti("P1 R2", Global.Config.ColecoController.R2);
colecoControls.BindMulti("P1 Key1", Global.Config.ColecoController._1);
colecoControls.BindMulti("P1 Key2", Global.Config.ColecoController._2);
colecoControls.BindMulti("P1 Key3", Global.Config.ColecoController._3);
colecoControls.BindMulti("P1 Key4", Global.Config.ColecoController._4);
colecoControls.BindMulti("P1 Key5", Global.Config.ColecoController._5);
colecoControls.BindMulti("P1 Key6", Global.Config.ColecoController._6);
colecoControls.BindMulti("P1 Key7", Global.Config.ColecoController._7);
colecoControls.BindMulti("P1 Key8", Global.Config.ColecoController._8);
colecoControls.BindMulti("P1 Key9", Global.Config.ColecoController._9);
colecoControls.BindMulti("P1 Star", Global.Config.ColecoController.Star);
colecoControls.BindMulti("P1 Pound", Global.Config.ColecoController.Pound);
Global.ColecoControls = colecoControls;
var TI83Controls = new Controller(TI83.TI83Controller);
TI83Controls.BindMulti("0", Global.Config.TI83Controller[0]._0);
TI83Controls.BindMulti("1", Global.Config.TI83Controller[0]._1);
@ -1010,6 +1033,9 @@ namespace BizHawk.MultiClient
break;
case "GB":
break;
case "COLV":
Global.ActiveController = Global.ColecoControls;
break;
default:
Global.ActiveController = Global.NullControls;
break;
@ -1221,6 +1247,10 @@ namespace BizHawk.MultiClient
Gameboy gb = new Gameboy(game, rom.FileData);
nextEmulator = gb;
break;
case "COLV":
ColecoVision c = new ColecoVision(game, rom.FileData);
nextEmulator = c;
break;
}
}
@ -2349,7 +2379,7 @@ namespace BizHawk.MultiClient
if (INTERIM)
{
ofd.Filter = FormatFilter(
"Rom Files", "*.nes;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.cue;*.exe;*.gg;*.gen;%ARCH%",
"Rom Files", "*.nes;*.sms;*.gg;*.sg;*.pce;*.sgx;*.bin;*.smd;*.rom;*.a26;*.cue;*.exe;*.gg;*.gen;*.col;%ARCH%",
"Disc Images", "*.cue",
"NES", "*.nes;%ARCH%",
"Master System", "*.sms;*.gg;*.sg;%ARCH%",
@ -2360,6 +2390,7 @@ namespace BizHawk.MultiClient
"Atari 2600 (experimental)", "*.a26;*.bin;%ARCH%",
"Genesis (experimental)", "*.gen;*.smd;*.bin;*.cue;%ARCH%",
"Gameboy (experimental)", "*.gb;%ARCH%",
"Colecovision (very experimental)", "*.col;%ARCH%",
"PSX Executables (experimental)", "*.exe",
"All Files", "*.*");
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB