Genesis support seems only partially-implemented

I tried making an effects pack for a Genesis game. I didn’t get far.

This is with the latest SDK from How to setup and use the Crowd Control SDK as of two days ago (CrowdControl.SDK.exe describes it as version 2.0.7117.38974).

The CrowdControl.Games assembly has a few *EffectPack classes to inherit from, but no GenesisEffectPack. Thinking that this was merely an oversight, I tried inheriting from Console32Pack<ConnectorLib.IGenesisConnector> directly, but ran into a couple issues:

  • IGenesisConnector isn’t an I32BitConnector (which I found to be unexpected; the 68000 implements a 32-bit ISA even though its internal ALU is 16-bit). Using Console16Pack<T> let me work around this.
  • Even once you do that, the CrowdControl.Common.ConnectorType enum has a GenesisConnector value, but once it gets to ConnectorLib.ConnectorFactory.GetConnectorType() it throws up its hands with a NotImplementedException. This seems to be a roadblock-- even though the LuaConnector is an IGenesisConnector it can’t be used because of this.

I’m not sure if this counts as a “bug” or a “missing feature”; the documentation on the SDK is pretty sparse right now so it’s not clear to me if this is or isn’t expected to work yet.

Hey. I’ve gone ahead and filled in the missing boilerplate in the SDK to make the Genesis support usable. I haven’t looked into what exactly is supported for the Genesis cores on Bizhawk (you may need to experiment). To be clear, the GenesisEffectPack is a Console16Pack<ConnectorLib.IGenesisConnector>. The 16 refers to the largest integer size for which the CPU has a well-defined endianness (generally the accumulator size). ConnectorLib’s address bus is always 64-bit and simply leaves unused areas unmapped.

Please let me know (feel free to respond right here) if you run into anything else missing or have any other questions.

Excellent, I’ll give this a spin. Thanks for hopping on this so quickly!

I can now get the pack to successfully show up in the SDK window. However, selecting it gives me an exception from a Union within RebuildConnectorList():

exception text

System.ArgumentNullException: Value cannot be null.
Parameter name: second
at System.Linq.Enumerable.Union[TSource](IEnumerable`1 first, IEnumerable`1 second)
at CrowdControl.SDK.FormMain.RebuildConnectorList()
at CrowdControl.SDK.FormMain.buttonSelectPack_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This error doesn’t seem to be specific to Genesis-- the same thing happens with the MegaMan2-example.cs.