diff --git a/VisualPinball.Engine.PinMAME.Unity/Editor/PinMameGamelogicEngineInspector.cs b/VisualPinball.Engine.PinMAME.Unity/Editor/PinMameGamelogicEngineInspector.cs index 3c2f38e..83746b9 100644 --- a/VisualPinball.Engine.PinMAME.Unity/Editor/PinMameGamelogicEngineInspector.cs +++ b/VisualPinball.Engine.PinMAME.Unity/Editor/PinMameGamelogicEngineInspector.cs @@ -54,6 +54,7 @@ private void OnEnable() new MedievalMadness(), new Terminator2(), new FlashGordon(), + new StarTrekEnterprise(), }; _gameNames = new[] {"-- none --"} .Concat(_games.Select(g => g.Name)) diff --git a/VisualPinball.Engine.PinMAME.Unity/Runtime/PinMameGamelogicEngine.cs b/VisualPinball.Engine.PinMAME.Unity/Runtime/PinMameGamelogicEngine.cs index be28f89..ac674d2 100644 --- a/VisualPinball.Engine.PinMAME.Unity/Runtime/PinMameGamelogicEngine.cs +++ b/VisualPinball.Engine.PinMAME.Unity/Runtime/PinMameGamelogicEngine.cs @@ -42,10 +42,7 @@ public class PinMameGamelogicEngine : MonoBehaviour, IGamelogicEngine public const string DmdPrefix = "dmd"; public const string SegDispPrefix = "display"; - public PinMameGame Game { - get => _game; - set => _game = value; - } + public PinMameGame Game { get => _game; set => _game = value; } [HideInInspector] public string romId = string.Empty; @@ -69,6 +66,8 @@ public GamelogicEngineLamp[] AvailableLamps { } } + public GamelogicEngineWire[] AvailableWires => _game?.AvailableWires ?? Array.Empty(); + public event EventHandler OnCoilChanged; public event EventHandler OnLampChanged; public event EventHandler OnLampsChanged; @@ -174,6 +173,16 @@ private void Update() OnLampChanged?.Invoke(this, new LampEventArgs(_lamps[changedLamp.Id].Id, changedLamp.Value)); } } + + // gi + foreach (var changedGi in _pinMame.GetChangedGIs()) { + if (_lamps.ContainsKey(changedGi.Id)) { + Logger.Info($"[PinMAME] <= gi {changedGi.Id}: {changedGi.Value}"); + OnLampChanged?.Invoke(this, new LampEventArgs(_lamps[changedGi.Id].Id, changedGi.Value, LampSource.GI)); + } else { + Debug.Log($"No GI {changedGi.Id} found."); + } + } } private void OnDisplayAvailable(int index, int displayCount, PinMameDisplayLayout displayLayout) @@ -277,7 +286,7 @@ private int OnAudioUpdated(IntPtr framePtr, int frameSize) if (_audioNumSamplesInput > 100000) { var delta = AudioSettings.dspTime - _audioInputStart; var queueMs = System.Math.Round(_audioQueue.Count * (double)_audioInfo.SamplesPerFrame / _audioInfo.SampleRate * 1000); - Debug.Log($"INPUT: {System.Math.Round(_audioNumSamplesInput / delta)} - {_audioQueue.Count} in queue ({queueMs}ms)"); + //Debug.Log($"INPUT: {System.Math.Round(_audioNumSamplesInput / delta)} - {_audioQueue.Count} in queue ({queueMs}ms)"); _audioInputStart = AudioSettings.dspTime; _audioNumSamplesInput = 0; } @@ -328,7 +337,7 @@ private void OnAudioFilterRead(float[] data, int channels) _audioNumSamplesOutput += data.Length / channels; if (_audioNumSamplesOutput > 100000) { var delta = AudioSettings.dspTime - _audioOutputStart; - Debug.Log($"OUTPUT: {System.Math.Round(_audioNumSamplesOutput / delta)}"); + //Debug.Log($"OUTPUT: {System.Math.Round(_audioNumSamplesOutput / delta)}"); _audioOutputStart = AudioSettings.dspTime; _audioNumSamplesOutput = 0; } diff --git a/VisualPinball.Engine.PinMAME/Games/FlashGordon.cs b/VisualPinball.Engine.PinMAME/Games/FlashGordon.cs index 4f21977..7294276 100644 --- a/VisualPinball.Engine.PinMAME/Games/FlashGordon.cs +++ b/VisualPinball.Engine.PinMAME/Games/FlashGordon.cs @@ -25,11 +25,11 @@ namespace VisualPinball.Engine.PinMAME.Games [Serializable] public class FlashGordon : Bally { - public override string Name { get; } = "Flash Gordon"; - public override string Id { get; } = "fg"; - public override int Year { get; } = 1980; - public override string Manufacturer { get; } = "Bally"; - public override int IpdbId { get; } = 874; + public override string Name => "Flash Gordon"; + public override string Id => "fg"; + public override int Year => 1980; + public override string Manufacturer => "Bally"; + public override int IpdbId => 874; public override PinMameRom[] Roms { get; } = { new PinMameRom("flashgdn"), diff --git a/VisualPinball.Engine.PinMAME/Games/MedievalMadness.cs b/VisualPinball.Engine.PinMAME/Games/MedievalMadness.cs index 66e2725..75abca4 100644 --- a/VisualPinball.Engine.PinMAME/Games/MedievalMadness.cs +++ b/VisualPinball.Engine.PinMAME/Games/MedievalMadness.cs @@ -18,7 +18,6 @@ using VisualPinball.Engine.Common; using VisualPinball.Engine.Game.Engines; using VisualPinball.Engine.PinMAME.MPUs; -using VisualPinball.Engine.VPT.Plunger; namespace VisualPinball.Engine.PinMAME.Games { diff --git a/VisualPinball.Engine.PinMAME/Games/StarTrekEnterprise.cs b/VisualPinball.Engine.PinMAME/Games/StarTrekEnterprise.cs new file mode 100644 index 0000000..725621a --- /dev/null +++ b/VisualPinball.Engine.PinMAME/Games/StarTrekEnterprise.cs @@ -0,0 +1,419 @@ +// Visual Pinball Engine +// Copyright (C) 2021 freezy and VPE Team +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using VisualPinball.Engine.Common; +using VisualPinball.Engine.Game.Engines; +using VisualPinball.Engine.Math; +using VisualPinball.Engine.PinMAME.MPUs; + +namespace VisualPinball.Engine.PinMAME.Games +{ + [Serializable] + public class StarTrekEnterprise : Wpc + { + public override string Name => "Star Trek - Enterprise Limited Edition"; + public override string Id => "star-trek-stern"; + public override int Year => 2013; + public override string Manufacturer => "Stern"; + public override int IpdbId => 6046; + public override PinMameRom[] Roms { get; } = { + new PinMameRom("st_120", "1.20"), + new PinMameRom("st_130", "1.30"), + new PinMameRom("st_140", "1.40"), + new PinMameRom("st_140h", "1.40h"), + new PinMameRom("st_141h", "1.41h"), + new PinMameRom("st_142h", "1.42h"), + new PinMameRom("st_150", "1.50"), + new PinMameRom("st_150h", "1.50h"), + new PinMameRom("st_160", "1.60"), + new PinMameRom("st_160h", "1.60h"), + new PinMameRom("st_161", "1.61"), + new PinMameRom("st_161h", "1.61h"), + }; + + protected override GamelogicEngineSwitch[] Switches { get; } = { + new GamelogicEngineSwitch("01") { Description = "(Beam) Me Up" }, + new GamelogicEngineSwitch("02") { Description = "Beam (Me) Up" }, + new GamelogicEngineSwitch("04") { Description = "Beam Me (Up)" }, + new GamelogicEngineSwitch("07") { Description = "Right 3-Bank Target (Top)" }, + new GamelogicEngineSwitch("08") { Description = "Right 3-Bank Target (Center)" }, + new GamelogicEngineSwitch("09") { Description = "Right 3-Bank Target (Bottom)" }, + new GamelogicEngineSwitch("10") { Description = "Left Eject" }, + new GamelogicEngineSwitch("11") { Description = "Center Drop Target" }, + new GamelogicEngineSwitch("12") { Description = "Spinner" }, + new GamelogicEngineSwitch("13") { Description = "Warp Ramp Enter" }, + new GamelogicEngineSwitch("14") { Description = "Left Ramp Enter" }, + new GamelogicEngineSwitch("15") { Description = "Tournament Start" }, + new GamelogicEngineSwitch("16") { Description = "Start" }, + new GamelogicEngineSwitch("18") { Description = "Trough #4 (Left)" }, + new GamelogicEngineSwitch("19") { Description = "Trough #3" }, + new GamelogicEngineSwitch("20") { Description = "Trough #2" }, + new GamelogicEngineSwitch("21") { Description = "Trough #1 (Right)" }, + new GamelogicEngineSwitch("22") { Description = "Trough Jam" }, + new GamelogicEngineSwitch("23") { Description = "Shooter Lane" }, + new GamelogicEngineSwitch("24") { Description = "(T)REK" }, + new GamelogicEngineSwitch("25") { Description = "T(R)EK" }, + new GamelogicEngineSwitch("26") { Description = "Left Slingshot" }, + new GamelogicEngineSwitch("27") { Description = "Right Slingshot" }, + new GamelogicEngineSwitch("28") { Description = "TR(E)K" }, + new GamelogicEngineSwitch("29") { Description = "TRE(K)" }, + new GamelogicEngineSwitch("30") { Description = "Left Pop Bumper" }, + new GamelogicEngineSwitch("31") { Description = "Right Pop Bumper" }, + new GamelogicEngineSwitch("32") { Description = "Bottom Pop Bumper" }, + new GamelogicEngineSwitch("33") { Description = "Center Lock (Bottom)" }, + new GamelogicEngineSwitch("34") { Description = "Center Lock (Top)" }, + new GamelogicEngineSwitch("35") { Description = "Left Ramp Exit" }, + new GamelogicEngineSwitch("36") { Description = "Warp Ramp Exit" }, + new GamelogicEngineSwitch("37") { Description = "Right Warp Entrance" }, + new GamelogicEngineSwitch("38") { Description = "Right Ramp Exit" }, + new GamelogicEngineSwitch("39") { Description = "Center 3-Bank Target (Top)" }, + new GamelogicEngineSwitch("40") { Description = "Center 3-Bank Target (Center)" }, + new GamelogicEngineSwitch("41") { Description = "Center 3-Bank Target (Bottom)" }, + new GamelogicEngineSwitch("42") { Description = "Left 2-Bank Target (Top)" }, + new GamelogicEngineSwitch("43") { Description = "Left 2-Bank Target (Bottom)" }, + new GamelogicEngineSwitch("44") { Description = "Behind Upper Flipper" }, + new GamelogicEngineSwitch("45") { Description = "Red Target 1" }, + new GamelogicEngineSwitch("46") { Description = "Red Target 2" }, + new GamelogicEngineSwitch("47") { Description = "Red Target 3" }, + new GamelogicEngineSwitch("48") { Description = "Big Red Target" }, + new GamelogicEngineSwitch("49") { Description = "Red Target 5" }, + new GamelogicEngineSwitch("50") { Description = "Red Target 6" }, + new GamelogicEngineSwitch("51") { Description = "Right Orbit" }, + new GamelogicEngineSwitch("52") { Description = "Left Orbit" }, + new GamelogicEngineSwitch("53") { Description = "Ship Crash" }, + }; + + public override GamelogicEngineLamp[] AvailableLamps { get; } = { + + new GamelogicEngineLamp("84") { Description = "Left Ramp Emblem - R", DeviceHint = "^L1$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("85") { Description = "Left Ramp Emblem - G", DeviceHint = "^L1$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("86") { Description = "Left Ramp Emblem - B", DeviceHint = "^L1$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("81") { Description = "Red Target 2 - R", DeviceHint = "^L2$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("87") { Description = "Red Target 2 - G", DeviceHint = "^L2$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("88") { Description = "Red Target 2 - B", DeviceHint = "^L2$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("83") { Description = "Left Ramp Enterprise Arrow - R", DeviceHint = "^L3$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("82") { Description = "Left Ramp Enterprise Arrow - G", DeviceHint = "^L3$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("89") { Description = "Left Ramp Enterprise Arrow - B", DeviceHint = "^L3$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("92") { Description = "Red Target 3 - R", DeviceHint = "^L4$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("91") { Description = "Red Target 3 - G", DeviceHint = "^L4$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("90") { Description = "Red Target 3 - B", DeviceHint = "^L4$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("93") { Description = "Center Lane Emblem - R", DeviceHint = "^L5$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("94") { Description = "Center Lane Emblem - G", DeviceHint = "^L5$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("95") { Description = "Center Lane Emblem - B", DeviceHint = "^L5$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("96") { Description = "Center Lane Enterprise Arrow - R", DeviceHint = "^L6$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("97") { Description = "Center Lane Enterprise Arrow - G", DeviceHint = "^L6$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("98") { Description = "Center Lane Enterprise Arrow - B", DeviceHint = "^L6$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("99") { Description = "Red Target 4 - R", DeviceHint = "^L7$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("100") { Description = "Red Target 4 - G", DeviceHint = "^L7$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("101") { Description = "Red Target 4 - B", DeviceHint = "^L7$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("102") { Description = "Black Hole Arrow - R", DeviceHint = "^L8$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("103") { Description = "Black Hole Arrow - G", DeviceHint = "^L8$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("104") { Description = "Black Hole Arrow - B", DeviceHint = "^L8$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("113") { Description = "Right Orbit Emblem - R", DeviceHint = "^L9$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("114") { Description = "Right Orbit Emblem - G", DeviceHint = "^L9$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("115") { Description = "Right Orbit Emblem - B", DeviceHint = "^L9$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("116") { Description = "Right Orbit Enterprise Arrow - R", DeviceHint = "^L10$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("117") { Description = "Right Orbit Enterprise Arrow - G", DeviceHint = "^L10$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("118") { Description = "Right Orbit Enterprise Arrow - B", DeviceHint = "^L10$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("119") { Description = "Red Target 6 - R", DeviceHint = "^L11$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("120") { Description = "Red Target 6 - G", DeviceHint = "^L11$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("121") { Description = "Red Target 6 - B", DeviceHint = "^L11$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("122") { Description = "Right Ramp Emblem - R", DeviceHint = "^L12$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("123") { Description = "Right Ramp Emblem - G", DeviceHint = "^L12$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("124") { Description = "Right Ramp Emblem - B", DeviceHint = "^L12$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("125") { Description = "Right Ramp Enterprise Arrow - R", DeviceHint = "^L13$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("126") { Description = "Right Ramp Enterprise Arrow - G", DeviceHint = "^L13$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("127") { Description = "Right Ramp Enterprise Arrow - B", DeviceHint = "^L13$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("128") { Description = "Red Target 5 - R", DeviceHint = "^L14$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("129") { Description = "Red Target 5 - G", DeviceHint = "^L14$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("130") { Description = "Red Target 5 - B", DeviceHint = "^L14$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("131") { Description = "Special - R", DeviceHint = "^L15$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("133") { Description = "Special - G", DeviceHint = "^L15$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("132") { Description = "Special - B", DeviceHint = "^L15$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("134") { Description = "Away Team - R", DeviceHint = "^L16$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("136") { Description = "Away Team - G", DeviceHint = "^L16$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("135") { Description = "Away Team - B", DeviceHint = "^L16$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("146") { Description = "Left Eject Lock - R", DeviceHint = "^L17$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("147") { Description = "Left Eject Lock - G", DeviceHint = "^L17$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("148") { Description = "Left Eject Lock - B", DeviceHint = "^L17$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("149") { Description = "Mission Start - R", DeviceHint = "^L18$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("150") { Description = "Mission Start - G", DeviceHint = "^L18$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("151") { Description = "Mission Start - B", DeviceHint = "^L18$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("152") { Description = "Left 2 Bank - Top - R", DeviceHint = "^L19$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("153") { Description = "Left 2 Bank - Top - G", DeviceHint = "^L19$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("154") { Description = "Left 2 Bank - Top - B", DeviceHint = "^L19$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("155") { Description = "Left Orbit Emblem - R", DeviceHint = "^L20$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("156") { Description = "Left Orbit Emblem - G", DeviceHint = "^L20$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("157") { Description = "Left Orbit Emblem - B", DeviceHint = "^L20$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("158") { Description = "Red Target 1 - R", DeviceHint = "^L21$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("159") { Description = "Red Target 1 - G", DeviceHint = "^L21$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("160") { Description = "Red Target 1 - B", DeviceHint = "^L21$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("161") { Description = "Left Orbit Enterprise Arrow - R", DeviceHint = "^L22$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("162") { Description = "Left Orbit Enterprise Arrow - G", DeviceHint = "^L22$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("163") { Description = "Left Orbit Enterprise Arrow - B", DeviceHint = "^L22$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("164") { Description = "Left 2 Bank (Bottom) - R", DeviceHint = "^L23$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("165") { Description = "Left 2 Bank (Bottom) - G", DeviceHint = "^L23$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("166") { Description = "Left 2 Bank (Bottom) - B", DeviceHint = "^L23$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("167") { Description = "Left Eject Emblem - R", DeviceHint = "^L24$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("168") { Description = "Left Eject Emblem - G", DeviceHint = "^L24$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("169") { Description = "Left Eject Emblem - B", DeviceHint = "^L24$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("170") { Description = "Left Eject Enterprise Arrow - R", DeviceHint = "^L25$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("171") { Description = "Left Eject Enterprise Arrow - G", DeviceHint = "^L25$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("172") { Description = "Left Eject Enterprise Arrow - B", DeviceHint = "^L25$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("179") { Description = "Kickback - R", DeviceHint = "^L26$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("177") { Description = "Kickback - G", DeviceHint = "^L26$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("178") { Description = "Kickback - B", DeviceHint = "^L26$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("182") { Description = "(T)REK - R", DeviceHint = "^L27$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("180") { Description = "(T)REK - G", DeviceHint = "^L27$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("181") { Description = "(T)REK - B", DeviceHint = "^L27$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("185") { Description = "T(R)EK - R", DeviceHint = "^L28$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("183") { Description = "T(R)EK - G", DeviceHint = "^L28$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("184") { Description = "T(R)EK - B", DeviceHint = "^L28$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("186") { Description = "Center 3 Bank (Bottom) - R", DeviceHint = "^L29$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("187") { Description = "Center 3 Bank (Bottom) - G", DeviceHint = "^L29$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("188") { Description = "Center 3 Bank (Bottom) - B", DeviceHint = "^L29$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("189") { Description = "Center 3 Bank (Center) - R", DeviceHint = "^L30$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("190") { Description = "Center 3 Bank (Center) - G", DeviceHint = "^L30$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("191") { Description = "Center 3 Bank (Center) - B", DeviceHint = "^L30$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("192") { Description = "Center 3 Bank (Top) - R", DeviceHint = "^L31$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("193") { Description = "Center 3 Bank (Top) - G", DeviceHint = "^L31$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("194") { Description = "Center 3 Bank (Top) - B", DeviceHint = "^L31$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("195") { Description = "Center Lane Lock - R", DeviceHint = "^L32$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("197") { Description = "Center Lane Lock - G", DeviceHint = "^L32$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("196") { Description = "Center Lane Lock - B", DeviceHint = "^L32$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("198") { Description = "Extra Ball - R", DeviceHint = "^L33$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("200") { Description = "Extra Ball - G", DeviceHint = "^L33$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("199") { Description = "Extra Ball - B", DeviceHint = "^L33$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("214") { Description = "Shoot Again - R", DeviceHint = "^L34$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("215") { Description = "Shoot Again - G", DeviceHint = "^L34$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("216") { Description = "Shoot Again - B", DeviceHint = "^L34$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("211") { Description = "The Captain's Chair - R", DeviceHint = "^L35$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("217") { Description = "The Captain's Chair - G", DeviceHint = "^L35$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("218") { Description = "The Captain's Chair - B", DeviceHint = "^L35$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("213") { Description = "Save the Enterprise - R", DeviceHint = "^L36$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("212") { Description = "Save the Enterprise - G", DeviceHint = "^L36$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("219") { Description = "Save the Enterprise - B", DeviceHint = "^L36$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("222") { Description = "Nero - R", DeviceHint = "^L37$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("221") { Description = "Nero - G", DeviceHint = "^L37$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("220") { Description = "Nero - B", DeviceHint = "^L37$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("223") { Description = "Destroy the Drill - R", DeviceHint = "^L38$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("224") { Description = "Destroy the Drill - G", DeviceHint = "^L38$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("225") { Description = "Destroy the Drill - B", DeviceHint = "^L38$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("226") { Description = "Space Jump - R", DeviceHint = "^L39$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("227") { Description = "Space Jump - G", DeviceHint = "^L39$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("228") { Description = "Space Jump - B", DeviceHint = "^L39$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("229") { Description = "Prime Directive - R", DeviceHint = "^L40$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("230") { Description = "Prime Directive - G", DeviceHint = "^L40$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("231") { Description = "Prime Directive - B", DeviceHint = "^L40$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("232") { Description = "Klingon Battle - R", DeviceHint = "^L41$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("233") { Description = "Klingon Battle - G", DeviceHint = "^L41$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("234") { Description = "Klingon Battle - B", DeviceHint = "^L41$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("235") { Description = "Status 1 (Bottom) - R", DeviceHint = "^L42$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("236") { Description = "Status 1 (Bottom) - G", DeviceHint = "^L42$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("237") { Description = "Status 1 (Bottom) - B", DeviceHint = "^L42$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("238") { Description = "Status 2 - R", DeviceHint = "^L43$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("239") { Description = "Status 2 - G", DeviceHint = "^L43$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("240") { Description = "Status 2 - B", DeviceHint = "^L43$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("241") { Description = "Status 3 - R", DeviceHint = "^L44$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("242") { Description = "Status 3 - G", DeviceHint = "^L44$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("243") { Description = "Status 3 - B", DeviceHint = "^L44$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("244") { Description = "Status 4 - R", DeviceHint = "^L45$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("245") { Description = "Status 4 - G", DeviceHint = "^L45$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("246") { Description = "Status 4 - B", DeviceHint = "^L45$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("247") { Description = "Status 5 - R", DeviceHint = "^L46$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("248") { Description = "Status 5 - G", DeviceHint = "^L46$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("249") { Description = "Status 5 - B", DeviceHint = "^L46$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("250") { Description = "Status 6 - R", DeviceHint = "^L47$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("251") { Description = "Status 6 - G", DeviceHint = "^L47$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("252") { Description = "Status 6 - B", DeviceHint = "^L47$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("253") { Description = "Status 7 - R", DeviceHint = "^L48$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("254") { Description = "Status 7 - G", DeviceHint = "^L48$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("255") { Description = "Status 7 - B", DeviceHint = "^L48$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("256") { Description = "Status 8 (Top) - R", DeviceHint = "^L49$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("257") { Description = "Status 8 (Top) - G", DeviceHint = "^L49$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("258") { Description = "Status 8 (Top) - B", DeviceHint = "^L49$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("276") { Description = "Warp Ramp Red", DeviceHint = "^L50$" }, + new GamelogicEngineLamp("277") { Description = "Enterprise", DeviceHint = "^L51$" }, + + new GamelogicEngineLamp("278") { Description = "Warp Ramp Emblem - R", DeviceHint = "^L52$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("279") { Description = "Warp Ramp Emblem - G", DeviceHint = "^L52$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("280") { Description = "Warp Ramp Emblem - B", DeviceHint = "^L52$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("281") { Description = "(Beam) Me Up - B", DeviceHint = "^L53$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("283") { Description = "(Beam) Me Up - B", DeviceHint = "^L53$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("282") { Description = "(Beam) Me Up - B", DeviceHint = "^L53$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("284") { Description = "Beam (Me) Up - R", DeviceHint = "^L54$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("286") { Description = "Beam (Me) Up - G", DeviceHint = "^L54$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("285") { Description = "Beam (Me) Up - B", DeviceHint = "^L54$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("287") { Description = "Beam Me (Up)", DeviceHint = "^L55$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("289") { Description = "Beam Me (Up) - G", DeviceHint = "^L55$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("288") { Description = "Beam Me (Up) - B", DeviceHint = "^L55$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("290") { Description = "Vengeance Saucer", DeviceHint = "^L56$" }, + new GamelogicEngineLamp("291") { Description = "Vengeance Nacelles (X2)", DeviceHint = "^L57$" }, + + new GamelogicEngineLamp("308") { Description = "Right 3 Bank (Top) - R", DeviceHint = "^L58$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("309") { Description = "Right 3 Bank (Top) - G", DeviceHint = "^L58$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("310") { Description = "Right 3 Bank (Top) - B", DeviceHint = "^L58$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("311") { Description = "Right 3 Bank (Center) - R", DeviceHint = "^L59$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("312") { Description = "Right 3 Bank (Center) - G", DeviceHint = "^L59$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("313") { Description = "Right 3 Bank (Center) - B", DeviceHint = "^L59$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("314") { Description = "Right 3 Bank (Bottom) - R", DeviceHint = "^L60$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("315") { Description = "Right 3 Bank (Bottom) - G", DeviceHint = "^L60$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("316") { Description = "Right 3 Bank (Bottom) - B", DeviceHint = "^L60$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("317") { Description = "TR(E)K - R", DeviceHint = "^L61$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("319") { Description = "TR(E)K - G", DeviceHint = "^L61$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("318") { Description = "TR(E)K - B", DeviceHint = "^L61$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("320") { Description = "TRE(K) - R", DeviceHint = "^L62$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("322") { Description = "TRE(K) - G", DeviceHint = "^L62$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("321") { Description = "TRE(K) - B", DeviceHint = "^L62$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("300") { Description = "Left Apron (X2) - R", DeviceHint = "^L63$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("302") { Description = "Left Apron (X2) - G", DeviceHint = "^L63$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("301") { Description = "Left Apron (X2) - B", DeviceHint = "^L63$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("303") { Description = "Right Apron (X2) - R", DeviceHint = "^L64$", Channel = ColorChannel.Red }, + new GamelogicEngineLamp("305") { Description = "Right Apron (X2) - G", DeviceHint = "^L64$", Channel = ColorChannel.Green }, + new GamelogicEngineLamp("304") { Description = "Right Apron (X2) - B", DeviceHint = "^L64$", Channel = ColorChannel.Blue }, + + new GamelogicEngineLamp("80") { Description = "Start Button", DeviceHint = "^L65$" }, + new GamelogicEngineLamp("78") { Description = "Fire (Red)", DeviceHint = "^L66$" }, + new GamelogicEngineLamp("77") { Description = "Fire (Green)", DeviceHint = "^L67$" }, + new GamelogicEngineLamp("76") { Description = "Fire (Blue)", DeviceHint = "^L68$" }, + new GamelogicEngineLamp("79") { Description = "Tournament Start Button", DeviceHint = "^L69$" }, + new GamelogicEngineLamp("295") { Description = "Warp Chaser 1 (LE)", DeviceHint = "^L70$" }, + new GamelogicEngineLamp("292") { Description = "Warp Chaser 2 (LE)", DeviceHint = "^L71$" }, + new GamelogicEngineLamp("293") { Description = "Warp Chaser 3 (LE)", DeviceHint = "^L72$" }, + new GamelogicEngineLamp("294") { Description = "Warp Chaser 4 (LE)", DeviceHint = "^L73$" }, + new GamelogicEngineLamp("299") { Description = "Warp Chaser 5 (LE)", DeviceHint = "^L74$" }, + new GamelogicEngineLamp("296") { Description = "Warp Chaser 6 (LE)", DeviceHint = "^L75$" }, + new GamelogicEngineLamp("297") { Description = "Warp Chaser 7 (LE)", DeviceHint = "^L76$" }, + new GamelogicEngineLamp("298") { Description = "Warp Chaser 8 (LE)", DeviceHint = "^L77$" }, + new GamelogicEngineLamp("50") { Description = "Cabinet Side Enterprise (X2) (LE)", DeviceHint = "^L78$" }, + new GamelogicEngineLamp("51") { Description = "Cabinet Side Phaser 1 (X2) (Front) (LE)", DeviceHint = "^L79$" }, + new GamelogicEngineLamp("52") { Description = "Cabinet Side Phaser 2 (X2) (LE)", DeviceHint = "^L80$" }, + new GamelogicEngineLamp("53") { Description = "Cabinet Side Phaser 3 (X2) (LE)", DeviceHint = "^L81$" }, + new GamelogicEngineLamp("54") { Description = "Cabinet Side Phaser 4 (X2) (LE)", DeviceHint = "^L82$" }, + new GamelogicEngineLamp("55") { Description = "Cabinet Side Phaser 5 (X2) (LE)", DeviceHint = "^L83$" }, + new GamelogicEngineLamp("56") { Description = "Cabinet Side Phaser 6 (X2) (LE)", DeviceHint = "^L84$" }, + new GamelogicEngineLamp("57") { Description = "Cabinet Side Phaser 7 (X2) (LE)", DeviceHint = "^L85$" }, + new GamelogicEngineLamp("58") { Description = "Cabinet Side Phaser 8 (X2) (LE)", DeviceHint = "^L86$" }, + new GamelogicEngineLamp("59") { Description = "Cabinet Side Phaser 9 (X2) (LE)", DeviceHint = "^L87$" }, + new GamelogicEngineLamp("60") { Description = "Cabinet Side Phaser 10 (X2) (LE)", DeviceHint = "^L88$" }, + new GamelogicEngineLamp("61") { Description = "Cabinet Side Phaser 11 (X2) (LE)", DeviceHint = "^L89$" }, + new GamelogicEngineLamp("62") { Description = "Cabinet Side Phaser 12(X2) (LE)", DeviceHint = "^L90$" }, + new GamelogicEngineLamp("63") { Description = "Cabinet Side Phaser 13 (X2) (LE)", DeviceHint = "^L91$" }, + new GamelogicEngineLamp("64") { Description = "Cabinet Side Phaser 14 (X2) (LE)", DeviceHint = "^L92$" }, + new GamelogicEngineLamp("65") { Description = "Cabinet Side Phaser 15 (X2) (LE)", DeviceHint = "^L93$" }, + new GamelogicEngineLamp("66") { Description = "Cabinet Side Phaser 16 (X2) (LE)", DeviceHint = "^L94$" }, + new GamelogicEngineLamp("67") { Description = "Cabinet Side Phaser 17 (X2) (LE)", DeviceHint = "^L95$" }, + new GamelogicEngineLamp("68") { Description = "Cabinet Side Phaser 18 (X2) (LE)", DeviceHint = "^L96$" }, + new GamelogicEngineLamp("69") { Description = "Cabinet Side Phaser 19 (X2) (LE)", DeviceHint = "^L97$" }, + new GamelogicEngineLamp("70") { Description = "Cabinet Side Phaser 20 (X2) (LE)", DeviceHint = "^L98$" }, + new GamelogicEngineLamp("71") { Description = "Cabinet Side Phaser 21 (X2) (LE)", DeviceHint = "^L99$" }, + new GamelogicEngineLamp("72") { Description = "Cabinet Side Phaser 22 (Back) (X2) (LE)", DeviceHint = "^L100$" }, + }; + + protected override GamelogicEngineCoil[] GameCoils { get; } = { + + new GamelogicEngineCoil("01") { Description = "Trough Up-Kicker" }, + new GamelogicEngineCoil("02") { Description = "Auto Launch" }, + new GamelogicEngineCoil("03") { Description = "Magnet" }, + new GamelogicEngineCoil("04") { Description = "Center Drop Target Up" }, + new GamelogicEngineCoil("05") { Description = "Center Drop Target Down" }, + new GamelogicEngineCoil("06") { Description = "Left Eject" }, + new GamelogicEngineCoil("07") { Description = "Vengeance Kick Back" }, + new GamelogicEngineCoil("08") { Description = "Shaker Motor (optional)" }, + new GamelogicEngineCoil("09") { Description = "Left Pop Bumper" }, + new GamelogicEngineCoil("10") { Description = "Right Pop Bumper" }, + new GamelogicEngineCoil("11") { Description = "Bottom Pop Bumper" }, + new GamelogicEngineCoil("12") { Description = "Upper Right Flipper" }, + new GamelogicEngineCoil("13") { Description = "Left Slingshot" }, + new GamelogicEngineCoil("14") { Description = "Right Slingshot" }, + new GamelogicEngineCoil("17") { Description = "Flash: Asteroid (left)", IsLamp = true }, + new GamelogicEngineCoil("18") { Description = "Flash: Asteroid (right)", IsLamp = true }, + new GamelogicEngineCoil("19") { Description = "Flash: Left Ramp (top)", IsLamp = true }, + new GamelogicEngineCoil("20") { Description = "Flash: Right Ramp (top)", IsLamp = true }, + new GamelogicEngineCoil("21") { Description = "Flash: Kick Back", IsLamp = true }, + new GamelogicEngineCoil("22") { Description = "Laser Motor" }, + new GamelogicEngineCoil("23") { Description = "Flash: Ramp (left)", IsLamp = true }, + new GamelogicEngineCoil("25") { Description = "Flash: Pop Bumpers", IsLamp = true }, + new GamelogicEngineCoil("26") { Description = "Flash: Warp Ramp Entrance", IsLamp = true }, + new GamelogicEngineCoil("27") { Description = "Flash: Center Three Banks", IsLamp = true }, + new GamelogicEngineCoil("28") { Description = "Flash: Ramp (right)", IsLamp = true }, + new GamelogicEngineCoil("29") { Description = "Flash: Left Loop", IsLamp = true }, + new GamelogicEngineCoil("30") { Description = "Flash: Upper Right Flipper", IsLamp = true }, + new GamelogicEngineCoil("31") { Description = "Flash: Vengeance Ship", IsLamp = true }, + new GamelogicEngineCoil("32") { Description = "Flash: Bottom Spot (left)", IsLamp = true }, + }; + } +} diff --git a/VisualPinball.Engine.PinMAME/Games/Terminator2.cs b/VisualPinball.Engine.PinMAME/Games/Terminator2.cs index 88e89bf..e4f69ab 100644 --- a/VisualPinball.Engine.PinMAME/Games/Terminator2.cs +++ b/VisualPinball.Engine.PinMAME/Games/Terminator2.cs @@ -24,11 +24,11 @@ namespace VisualPinball.Engine.PinMAME.Games [Serializable] public class Terminator2 : Wpc { - public override string Name { get; } = "Terminator 2: Judgment Day"; - public override string Id { get; } = "t2"; - public override int Year { get; } = 1991; - public override string Manufacturer { get; } = "Williams"; - public override int IpdbId { get; } = 2524; + public override string Name => "Terminator 2: Judgment Day"; + public override string Id => "t2"; + public override int Year => 1991; + public override string Manufacturer => "Williams"; + public override int IpdbId => 2524; public override PinMameRom[] Roms { get; } = { new PinMameRom("t2_l2", "L-2"), new PinMameRom("t2_l3", "L-3"), @@ -46,10 +46,10 @@ public class Terminator2 : Wpc protected override GamelogicEngineSwitch[] Switches { get; } = { new GamelogicEngineSwitch("13") { Description = "Start Button", InputActionHint = InputConstants.ActionStartGame }, new GamelogicEngineSwitch("14") { Description = "Plumb Bob Tilt" }, - new GamelogicEngineSwitch("15") { Description = "Trough Left", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "2" }, - new GamelogicEngineSwitch("16") { Description = "Trough Center", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "3" }, - new GamelogicEngineSwitch("17") { Description = "Trough Right", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "4" }, - new GamelogicEngineSwitch("18") { Description = "Outhole", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "1" }, + new GamelogicEngineSwitch("15") { Description = "Trough Left", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "3" }, + new GamelogicEngineSwitch("16") { Description = "Trough Center", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "2" }, + new GamelogicEngineSwitch("17") { Description = "Trough Right", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "1" }, + new GamelogicEngineSwitch("18") { Description = "Outhole", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "drain_switch" }, //new GamelogicEngineSwitch("21") { Description = "Slam Tilt" }, new GamelogicEngineSwitch("22") { Description = "Coin Door Closed", NormallyClosed = true, InputActionHint = InputConstants.ActionCoinDoorOpenClose }, @@ -172,13 +172,19 @@ public class Terminator2 : Wpc new GamelogicEngineLamp("85") { Description = "Drop Target" }, new GamelogicEngineLamp("86") { Description = "Top Lane Left" }, new GamelogicEngineLamp("87") { Description = "Top Lane Center" }, - new GamelogicEngineLamp("88") { Description = "Top Lane Right" } + new GamelogicEngineLamp("88") { Description = "Top Lane Right" }, + + new GamelogicEngineLamp("0") { Description = "GI: Top Insert", Source = LampSource.GI, FadingSteps = 8 }, + new GamelogicEngineLamp("1") { Description = "GI: Bottom Insert", Source = LampSource.GI, FadingSteps = 8 }, + new GamelogicEngineLamp("2") { Description = "GI: Right Playfield", Source = LampSource.GI, FadingSteps = 8 }, + new GamelogicEngineLamp("3") { Description = "GI: CPU String", Source = LampSource.GI, FadingSteps = 8 }, + new GamelogicEngineLamp("4") { Description = "GI: Left Playfield", Source = LampSource.GI, FadingSteps = 8 }, }; protected override GamelogicEngineCoil[] GameCoils { get; } = { new GamelogicEngineCoil("01") { Description = "Ball Popper" }, new GamelogicEngineCoil("02") { Description = "Gun Kicker" }, - new GamelogicEngineCoil("03") { Description = "Outhole" }, + new GamelogicEngineCoil("03") { Description = "Outhole", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "entry_coil" }, new GamelogicEngineCoil("04") { Description = "Trough", DeviceHint = "^Trough\\s*\\d?", DeviceItemHint = "eject_coil" }, new GamelogicEngineCoil("05") { Description = "Right Sling" }, new GamelogicEngineCoil("06") { Description = "Left Sling" }, @@ -192,18 +198,18 @@ public class Terminator2 : Wpc new GamelogicEngineCoil("14") { Description = "Right Jet" }, new GamelogicEngineCoil("15") { Description = "Bottom Jet" }, new GamelogicEngineCoil("16") { Description = "Left Lock" }, - new GamelogicEngineCoil("17") { Description = "Hot Dog Flashlamps", IsLamp = true}, - new GamelogicEngineCoil("18") { Description = "Right Sling Flashlamps", IsLamp = true }, - new GamelogicEngineCoil("19") { Description = "Left Sling Flashlamps", IsLamp = true }, - new GamelogicEngineCoil("20") { Description = "Left Lock Flashlamps", IsLamp = true }, - new GamelogicEngineCoil("21") { Description = "Gun Flashlamps", IsLamp = true}, - new GamelogicEngineCoil("22") { Description = "Right Ramp Flashlamps", IsLamp = true }, - new GamelogicEngineCoil("23") { Description = "Left Ramp Flashlamps", IsLamp = true }, - new GamelogicEngineCoil("24") { Description = "Backglass Flashlamp", IsLamp = true }, - new GamelogicEngineCoil("25") { Description = "Targets Flashlamps", IsLamp = true }, - new GamelogicEngineCoil("26") { Description = "Left Popper Flashlamps", IsLamp = true }, - new GamelogicEngineCoil("27") { Description = "Right Popper" }, - new GamelogicEngineCoil("28") { Description = "Flashlamps Drop Target" }, + new GamelogicEngineCoil("17") { Description = "Hot Dog Flashlamps", IsLamp = true, DeviceHint = "^F1?17$"}, + new GamelogicEngineCoil("18") { Description = "Right Sling Flashlamps", IsLamp = true, DeviceHint = "^F1?18$" }, + new GamelogicEngineCoil("19") { Description = "Left Sling Flashlamps", IsLamp = true, DeviceHint = "^F1?19$" }, + new GamelogicEngineCoil("20") { Description = "Left Lock Flashlamps", IsLamp = true, DeviceHint = "^F1?20$" }, + new GamelogicEngineCoil("21") { Description = "Gun Flashlamps", IsLamp = true, DeviceHint = "^F1?21$" }, + new GamelogicEngineCoil("22") { Description = "Right Ramp Flashlamps", IsLamp = true, DeviceHint = "^F1?22$" }, + new GamelogicEngineCoil("23") { Description = "Left Ramp Flashlamps", IsLamp = true, DeviceHint = "^F1?23$" }, + new GamelogicEngineCoil("24") { Description = "Backglass Flashlamp", IsLamp = true, DeviceHint = "^F1?24$" }, + new GamelogicEngineCoil("25") { Description = "Targets Flashlamps", IsLamp = true, DeviceHint = "^F1?25$" }, + new GamelogicEngineCoil("26") { Description = "Left Popper Flashlamps", IsLamp = true, DeviceHint = "^F1?26$" }, + new GamelogicEngineCoil("27") { Description = "Right Popper Flashlamps", IsLamp = true, DeviceHint = "^F1?27$" }, + new GamelogicEngineCoil("28") { Description = "Flashlamps Drop Target", IsLamp = true, DeviceHint = "^F1?28$" }, new GamelogicEngineCoil(CoilFlipperLowerRight, 46) { Description = "Lower Right Flipper", DeviceHint = "^RightFlipper$"}, new GamelogicEngineCoil(CoilFlipperLowerLeft, 48) { Description = "Lower Left Flipper", DeviceHint = "^LeftFlipper$"}, diff --git a/VisualPinball.Engine.PinMAME/MPUs/Bally.cs b/VisualPinball.Engine.PinMAME/MPUs/Bally.cs index 2ed1e9e..d5f981e 100644 --- a/VisualPinball.Engine.PinMAME/MPUs/Bally.cs +++ b/VisualPinball.Engine.PinMAME/MPUs/Bally.cs @@ -38,7 +38,7 @@ public abstract class Bally : PinMameGame new GamelogicEngineSwitch(SwCpuDiagnose, -6) {Description = "CPU Diagnose"}, new GamelogicEngineSwitch(SwSoundDiagnose, -5) {Description = "Sound Diagnose"}, new GamelogicEngineSwitch(SwBallRollTilt, 2) {Description = "Ball Roll Tilt"}, - new GamelogicEngineSwitch(SwStartButton, 06) {Description = "Start Button", InputActionHint = InputConstants.ActionStartGame, InputMapHint = InputConstants.MapCabinetSwitches }, + new GamelogicEngineSwitch(SwStartButton, 6) {Description = "Start Button", InputActionHint = InputConstants.ActionStartGame, InputMapHint = InputConstants.MapCabinetSwitches }, new GamelogicEngineSwitch(SwTilt, 7) {Description = "Tilt" }, new GamelogicEngineSwitch(SwSlamTilt, 16) {Description = "Slam Tilt", InputActionHint = InputConstants.ActionSlamTilt, InputMapHint = InputConstants.MapCabinetSwitches }, new GamelogicEngineSwitch(SwCoin1, 11) {Description = "Coin Button 1", InputActionHint = InputConstants.ActionInsertCoin1, InputMapHint = InputConstants.MapCabinetSwitches }, diff --git a/VisualPinball.Engine.PinMAME/PinMameGame.cs b/VisualPinball.Engine.PinMAME/PinMameGame.cs index ce16cf7..8388f97 100644 --- a/VisualPinball.Engine.PinMAME/PinMameGame.cs +++ b/VisualPinball.Engine.PinMAME/PinMameGame.cs @@ -75,6 +75,13 @@ public abstract class PinMameGame public abstract GamelogicEngineLamp[] AvailableLamps { get; } + public GamelogicEngineWire[] AvailableWires { get; } = { + new GamelogicEngineWire(SwFlipperLowerLeft, CoilFlipperLowerLeft, DestinationType.Coil, "Lower Left Flipper"), + new GamelogicEngineWire(SwFlipperLowerRight, CoilFlipperLowerRight, DestinationType.Coil, "Lower Right Flipper"), + new GamelogicEngineWire(SwFlipperUpperLeft, CoilFlipperUpperLeft, DestinationType.Coil, "Upper Left Flipper"), + new GamelogicEngineWire(SwFlipperUpperRight, CoilFlipperUpperRight, DestinationType.Coil, "Upper Right Flipper"), + }; + /// /// These coils are common to all games. /// diff --git a/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj b/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj index 7d6872d..510558b 100644 --- a/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj +++ b/VisualPinball.Engine.PinMAME/VisualPinball.Engine.PinMAME.csproj @@ -16,9 +16,9 @@ - - - + + +