-
Posts
3,753 -
Joined
-
Last visited
-
Days Won
178
Content Type
Profiles
Forums
Gallery
Downloads
Articles
Everything posted by johnparker007
-
Hey I don't mind if SD wants to comment on older threads I commented on one or two since they'd appeared on the Unread section, then noticed they were from 2+ years back from inactive users, so thought I should give a heads up I think if the original poster hasn't been active on Dif for like 3+ months it's worth pointing out, since they'll likely not come back to see the replies...
-
I think @SocialDragon368 commented on a bunch of ancient forum threads a day or two ago, so they all popped up at the top of my 'Unread' list!
-
As it's thread necro time today it seems It's prob some old baked in stuff, MFME also connects to Dif to try to download ROMs for layouts. It's nothing malicious
-
-
Direct link to the post with the fix: This also needs you to have the latest MFME installed on your system, and updated to the latest version (v20.1). Good luck - if you are still stuck, post here and tag my username so I see it, we should be able to get you up and running. In the future there won't be these issues, it's all down to the various hacks that have to be done to use MFME as the emulation backend... but the new project is a very long way off yet.
-
Source code / disassembly / reverse engineering question.
johnparker007 replied to redbags's topic in The Laboratory
I wonder if setting up a Windows 10 Virtual Machine image might be the way to go, if it has a very picky toolchain to set up... so then when it's working, that image can be shared/preserved, and should work in the future even on Win 11 / Linux / Mac (running the Virtual Machine Image on something like VirtualBox). I'm not sure how much I can really contribute to the process, I never actually worked on making fruit machines, and my free fme dev time is usually committed to working on the new Oasis project - but if I can help in some way with you copying your set up that used to work over to the Win 10 VM and testing etc, lemme know The VM should mean that if it works on your machine under VirtualBox, it should run on anyone's machine using VirtualBox (in theory! ) Your plan to use Epoch sounds sensible, if that has little to no legal risks compared to the Bell Fruit stuff So people could test their games they have created in MFME, and then in theory burn to chips, and build a real machine from them using Epoch parts. -
Source code / disassembly / reverse engineering question.
johnparker007 replied to redbags's topic in The Laboratory
Part of this process would be reverse engineering 'libs'. So each fruit machine, even something like a somewhat templated Speccy game by Ocean would use libs, and then these would most likely be using some 'relocatable source' for generic functions. So, if you are writing a routine for an MPU4 machine to pay out a coin, you may 'call' (not really a call) a Macro in the src: PAYOUT(1) Of course, lots is nested in there. It gets tricky, quick, unfortunately So in assembler, you'd do the equivalent of a c #include, and include some say 6809 source (in an MPU4 game). It's all fairly straightforward when writing the game, but to work backwards from the ROM is near infinitely more a ball ache. It's all stuff that's not impossible, but is a massive amount of effort even (only) in the hands of a highly skilled retro coder. Maybe one day something with AI could be employed to expedite the process, but for reference here's a quick random n64 repo I found, early commits from 4 years ago, still in progress https://github.com/pmret/papermario TLDR: it's complicated and takes bloomin' ages. Also the code is less interchangeable than n64 game code due to the manufacturer fragmentation, so bonus despair ahead. TLDR TLDR: it's a lot more work than it sounds, even if you have leet skillz On a non-despair note; if @edwardb reads this, and is up for sharing his set of libs and build env, perhaps as part of a VM, for incoming coders to use to build new games, that would be a great step forward in creating new machines on those platforms etc. Totally understand Edward if this is impossible due to still binding NDAs etc. -
Yes, I think it is the most nostalgic of machines An issue 1 would be amazing, ever since you told me about that one you had with the hard drawn tracks on the PCB - I'm guessing it looked like this: One day mate There's probably still some undiscovered ones in dead flesh cases that haven't been opened since the 80s, just out there, lurking around!
-
Yeah it's that sweet-ass FDD sticker that makes it, I have one of those also in the collection - even got a QL lurking on the shelves Just had to look that up, now that looks nice...
-
Haha I wasn't fussed about preserving the RF since it looks kinda dreadful... this also allows the RF to become the composite socket so you don't need to make the hole in the case
-
This is the way
-
A Harlequin in a new build toastrack case, now that is nice I still have my toastie I bought a few years back
-
This bluetooth keyboard project was by Steve Wilcox (Elite) - I'm normally a fan of software folks from the Speccy era, but he ripped me off £5k for R-Type mobile ports back in the day And probs some royalties too - so not a fan lol I also believe there is input latency with the bluetooth anyway (with some Speccy games needing precise 'pixel perfect' input), though to be fair I've read it's a pretty good physical copy of the original on a cosmetic level. Though for just an accurate collector piece you'd be better trying to source a clean original 48k unit.
-
I believe it's based on the Harlequin arch, so a real Speccy, not an emulator. But with modern conveniences built into the new design https://github.com/DonSuperfo/Superfo-Harlequin-128
-
Nice, sounds like it has a turbo function like the Next! Would recommend running Stunt Car Racer and some of those very early 3d games like Driller, there was a bunch on that Freescape engine - they are all much improved with an overclocked Speccy
-
Nice all in one unit! I liked Valkyrie 17 as an adventure game for the Speccy
-
I did reply to your previous post about this here: In short it will need some programming knowledge. I unfortunately really can't spare the time to work on this at present, but for someone will some coding knowledge, you should have all you need to get started in my previous reply. Would recommend trying to get an initial LED blinking... then branch out from there into how you might try control other things.
-
I haven't looked into the pac drive, however there is an SDK here: http://www.ultimarc.com/PacDriveSDK.zip If you are using Unity you'll be interested in the c# code below to interface with the .dll: Hope that helps // * ---------------------------------------------------------------------------- // * Author: Ben Baker // * Website: headsoft.com.au // * E-Mail: benbaker@headsoft.com.au // * Copyright (C) 2015 Headsoft. All Rights Reserved. // * ---------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Diagnostics; using System.IO; using System.Windows.Forms; namespace PacDriveDemo { public class PacDrive : IDisposable { // **************************************************************** // PacDrive / U-HID / Blue-HID // **************************************************************** // - 16 LED channels // **************************************************************** // Nano-LED // **************************************************************** // - 60 LED channels // - 256 brightness levels // - 20 RGB LEDs // **************************************************************** // PacLED64 // **************************************************************** // - 64 LED channels // - 256 brightness levels // - 21 RGB LEDs // **************************************************************** // I-Pac Ultimate I/O // **************************************************************** // - 96 LED channels // - 256 brightness levels // - 32 RGB LEDs public const int MAX_DEVICES = 16; public const int MAX_LEDCOUNT = 96; public const int MAX_INTENSITY = 255; public enum DeviceType { Unknown, PacDrive, UHID, BlueHID, NanoLED, PacLED64, IPacUltimateIO, ServoStik, USBButton }; public enum FlashSpeed : byte { AlwaysOn = 0, Seconds_2 = 1, Seconds_1 = 2, Seconds_0_5 = 3 }; // ================== 32-bit ==================== [DllImport("PacDrive32.dll", EntryPoint = "PacSetCallbacks", CallingConvention = CallingConvention.StdCall)] private static extern void PacSetCallbacks32(USBDEVICE_ATTACHED_CALLBACK usbDeviceAttachedCallback, USBDEVICE_REMOVED_CALLBACK usbDeviceRemovedCallback); [DllImport("PacDrive32.dll", EntryPoint = "PacInitialize", CallingConvention = CallingConvention.StdCall)] private static extern int PacInitialize32(); [DllImport("PacDrive32.dll", EntryPoint = "PacShutdown", CallingConvention = CallingConvention.StdCall)] private static extern void PacShutdown32(); [DllImport("PacDrive32.dll", EntryPoint = "PacSetLEDStates", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetLEDStates32(int id, ushort data); [DllImport("PacDrive32.dll", EntryPoint = "PacSetLEDState", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetLEDState32(int id, int port, [MarshalAs(UnmanagedType.Bool)] bool state); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDStates", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDStates32(int id, int group, byte data); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDState", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDState32(int id, int group, int port, [MarshalAs(UnmanagedType.Bool)] bool state); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDStatesRandom", CallingConvention = CallingConvention.StdCall)] private static extern bool Pac64SetLEDStatesRandom32(int id); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDIntensities", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDIntensities32(int id, byte[] dataArray); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDIntensity", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDIntensity32(int id, int port, byte intensity); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDFadeTime", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDFadeTime32(int id, byte fadeTime); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDFlashSpeeds", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDFlashSpeeds32(int id, byte flashSpeed); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetLEDFlashSpeed", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDFlashSpeed32(int id, int port, byte flashSpeed); [DllImport("PacDrive32.dll", EntryPoint = "Pac64StartScriptRecording", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64StartScriptRecording32(int id); [DllImport("PacDrive32.dll", EntryPoint = "Pac64StopScriptRecording", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64StopScriptRecording32(int id); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetScriptStepDelay", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetScriptStepDelay32(int id, byte stepDelay); [DllImport("PacDrive32.dll", EntryPoint = "Pac64RunScript", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64RunScript32(int id); [DllImport("PacDrive32.dll", EntryPoint = "Pac64ClearFlash", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64ClearFlash32(int id); [DllImport("PacDrive32.dll", EntryPoint = "Pac64SetDeviceId", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetDeviceId32(int id, int newId); [DllImport("PacDrive32.dll", EntryPoint = "PacGetDeviceType", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetDeviceType32(int id); [DllImport("PacDrive32.dll", EntryPoint = "PacGetVendorId", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetVendorId32(int id); [DllImport("PacDrive32.dll", EntryPoint = "PacGetProductId", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetProductId32(int id); [DllImport("PacDrive32.dll", EntryPoint = "PacGetVersionNumber", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetVersionNumber32(int id); [DllImport("PacDrive32.dll", EntryPoint = "PacGetVendorName", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetVendorName32(int id, StringBuilder vendorName); [DllImport("PacDrive32.dll", EntryPoint = "PacGetProductName", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetProductName32(int id, StringBuilder productName); [DllImport("PacDrive32.dll", EntryPoint = "PacGetSerialNumber", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetSerialNumber32(int id, StringBuilder serialNumber); [DllImport("PacDrive32.dll", EntryPoint = "PacGetDevicePath", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetDevicePath32(int id, StringBuilder devicePath); [DllImport("PacDrive32.dll", EntryPoint = "PacProgramUHid", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacProgramUHid32(int id, StringBuilder fileName); [DllImport("PacDrive32.dll", EntryPoint = "PacSetServoStik4Way", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetServoStik4Way32(); [DllImport("PacDrive32.dll", EntryPoint = "PacSetServoStik8Way", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetServoStik8Way32(); [DllImport("PacDrive32.dll", EntryPoint = "USBButtonConfigurePermanent", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonConfigurePermanent32(int id, byte[] dataArray); [DllImport("PacDrive32.dll", EntryPoint = "USBButtonConfigureTemporary", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonConfigureTemporary32(int id, byte[] dataArray); [DllImport("PacDrive32.dll", EntryPoint = "USBButtonConfigureColor", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonConfigureColor32(int id, byte red, byte green, byte blue); [DllImport("PacDrive32.dll", EntryPoint = "USBButtonGetState", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonGetState32(int id, [MarshalAs(UnmanagedType.Bool)] ref bool state); // ================== 64-bit ==================== [DllImport("PacDrive64.dll", EntryPoint = "PacSetCallbacks", CallingConvention = CallingConvention.StdCall)] private static extern void PacSetCallbacks64(USBDEVICE_ATTACHED_CALLBACK usbDeviceAttachedCallback, USBDEVICE_REMOVED_CALLBACK usbDeviceRemovedCallback); [DllImport("PacDrive64.dll", EntryPoint = "PacInitialize", CallingConvention = CallingConvention.StdCall)] private static extern int PacInitialize64(); [DllImport("PacDrive64.dll", EntryPoint = "PacShutdown", CallingConvention = CallingConvention.StdCall)] private static extern void PacShutdown64(); [DllImport("PacDrive64.dll", EntryPoint = "PacSetLEDStates", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetLEDStates64(int id, ushort data); [DllImport("PacDrive64.dll", EntryPoint = "PacSetLEDState", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetLEDState64(int id, int port, [MarshalAs(UnmanagedType.Bool)] bool state); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDStates", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDStates64(int id, int group, byte data); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDState", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDState64(int id, int group, int port, [MarshalAs(UnmanagedType.Bool)] bool state); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDStatesRandom", CallingConvention = CallingConvention.StdCall)] private static extern bool Pac64SetLEDStatesRandom64(int id); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDIntensities", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDIntensities64(int id, byte[] dataArray); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDIntensity", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDIntensity64(int id, int port, byte intensity); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDFadeTime", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDFadeTime64(int id, byte fadeTime); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDFlashSpeeds", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDFlashSpeeds64(int id, byte flashSpeed); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetLEDFlashSpeed", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetLEDFlashSpeed64(int id, int port, byte flashSpeed); [DllImport("PacDrive64.dll", EntryPoint = "Pac64StartScriptRecording", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64StartScriptRecording64(int id); [DllImport("PacDrive64.dll", EntryPoint = "Pac64StopScriptRecording", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64StopScriptRecording64(int id); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetScriptStepDelay", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetScriptStepDelay64(int id, byte stepDelay); [DllImport("PacDrive64.dll", EntryPoint = "Pac64RunScript", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64RunScript64(int id); [DllImport("PacDrive64.dll", EntryPoint = "Pac64ClearFlash", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64ClearFlash64(int id); [DllImport("PacDrive64.dll", EntryPoint = "Pac64SetDeviceId", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool Pac64SetDeviceId64(int id, int newId); [DllImport("PacDrive64.dll", EntryPoint = "PacGetDeviceType", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetDeviceType64(int id); [DllImport("PacDrive64.dll", EntryPoint = "PacGetVendorId", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetVendorId64(int id); [DllImport("PacDrive64.dll", EntryPoint = "PacGetProductId", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetProductId64(int id); [DllImport("PacDrive64.dll", EntryPoint = "PacGetVersionNumber", CallingConvention = CallingConvention.StdCall)] private static extern int PacGetVersionNumber64(int id); [DllImport("PacDrive64.dll", EntryPoint = "PacGetVendorName", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetVendorName64(int id, StringBuilder vendorName); [DllImport("PacDrive64.dll", EntryPoint = "PacGetProductName", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetProductName64(int id, StringBuilder productName); [DllImport("PacDrive64.dll", EntryPoint = "PacGetSerialNumber", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetSerialNumber64(int id, StringBuilder serialNumber); [DllImport("PacDrive64.dll", EntryPoint = "PacGetDevicePath", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] private static extern void PacGetDevicePath64(int id, StringBuilder devicePath); [DllImport("PacDrive64.dll", EntryPoint = "PacProgramUHid", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacProgramUHid64(int id, StringBuilder fileName); [DllImport("PacDrive64.dll", EntryPoint = "PacSetServoStik4Way", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetServoStik4Way64(); [DllImport("PacDrive64.dll", EntryPoint = "PacSetServoStik8Way", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool PacSetServoStik8Way64(); [DllImport("PacDrive64.dll", EntryPoint = "USBButtonConfigurePermanent", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonConfigurePermanent64(int id, byte[] dataArray); [DllImport("PacDrive64.dll", EntryPoint = "USBButtonConfigureTemporary", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonConfigureTemporary64(int id, byte[] dataArray); [DllImport("PacDrive64.dll", EntryPoint = "USBButtonConfigureColor", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonConfigureColor64(int id, byte red, byte green, byte blue); [DllImport("PacDrive64.dll", EntryPoint = "USBButtonGetState", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool USBButtonGetState64(int id, [MarshalAs(UnmanagedType.Bool)] ref bool state); private delegate void USBDEVICE_ATTACHED_CALLBACK(int id); private delegate void USBDEVICE_REMOVED_CALLBACK(int id); public delegate void UsbDeviceAttachedDelegate(int id); public delegate void UsbDeviceRemovedDelegate(int id); public event UsbDeviceAttachedDelegate OnUsbDeviceAttached = null; public event UsbDeviceRemovedDelegate OnUsbDeviceRemoved = null; [MarshalAs(UnmanagedType.FunctionPtr)] USBDEVICE_ATTACHED_CALLBACK UsbDeviceAttachedCallbackPtr = null; [MarshalAs(UnmanagedType.FunctionPtr)] USBDEVICE_REMOVED_CALLBACK UsbDeviceRemovedCallbackPtr = null; private Control m_ctrl; private bool m_is64Bit = false; private bool[][] m_LEDState; private byte[][] m_LEDIntensity; private int m_deviceCount = 0; private bool m_disposed = false; public PacDrive(Control ctrl) { m_ctrl = ctrl; m_is64Bit = Is64Bit(); UsbDeviceAttachedCallbackPtr = new USBDEVICE_ATTACHED_CALLBACK(UsbDeviceAttachedCallback); UsbDeviceRemovedCallbackPtr = new USBDEVICE_REMOVED_CALLBACK(UsbDeviceRemovedCallback); if (m_is64Bit) PacSetCallbacks64(UsbDeviceAttachedCallbackPtr, UsbDeviceRemovedCallbackPtr); else PacSetCallbacks32(UsbDeviceAttachedCallbackPtr, UsbDeviceRemovedCallbackPtr); m_LEDState = new bool[MAX_DEVICES][]; m_LEDIntensity = new byte[MAX_DEVICES][]; for (int i = 0; i < MAX_DEVICES; i++) { m_LEDState[i] = new bool[MAX_LEDCOUNT]; m_LEDIntensity[i] = new byte[MAX_LEDCOUNT]; for (int j = 0; j < MAX_LEDCOUNT; j++) { m_LEDState[i][j] = false; m_LEDIntensity[i][j] = 0; } } } private void UsbDeviceAttachedCallback(int id) { m_deviceCount++; if (OnUsbDeviceAttached != null) m_ctrl.BeginInvoke(OnUsbDeviceAttached, id); } private void UsbDeviceRemovedCallback(int id) { m_deviceCount--; if (OnUsbDeviceRemoved != null) m_ctrl.BeginInvoke(OnUsbDeviceRemoved, id); } public int Initialize() { m_deviceCount = (m_is64Bit ? PacInitialize64() : PacInitialize32()); return m_deviceCount; } public void Shutdown() { if (m_is64Bit) PacShutdown64(); else PacShutdown32(); } public bool SetLEDStates(int id, ushort data) { if (id >= m_deviceCount) return false; return (m_is64Bit ? PacSetLEDStates64(id, data) : PacSetLEDStates32(id, data)); } public bool SetLEDState(int id, int port, bool state) { if (id >= m_deviceCount) return false; return (m_is64Bit ? PacSetLEDState64(id, port, state) : PacSetLEDState32(id, port, state)); } public bool SetLEDStates(int id, bool[] stateArray) { Array.Copy(stateArray, m_LEDState[id], Math.Min(stateArray.Length, m_LEDState[id].Length)); return SetLEDStates(id); } public bool SetLEDStates(int id) { if (id >= m_deviceCount) return false; bool retVal = false; if (IsPacDrive(id)) { ushort dataSend = 0; for (int i = 0; i < m_LEDState[id].Length; i++) if (m_LEDState[id][i]) dataSend |= (ushort)(1 << i); retVal = (m_is64Bit ? PacSetLEDStates64(id, dataSend) : PacSetLEDStates32(id, dataSend)); } else if (IsPac64(id)) { for (int i = 0; i < m_LEDState[id].Length; i += 8) { int group = (i / 8) + 1; byte dataSend = 0; for (int j = 0; j < 8; j++) if (m_LEDState[id][i + j]) dataSend |= (byte)(1 << j); retVal = (m_is64Bit ? Pac64SetLEDStates64(id, group, dataSend) : Pac64SetLEDStates32(id, group, dataSend)); } } return retVal; } public bool SetLEDStatesRandom(int id) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetLEDStatesRandom64(id) : Pac64SetLEDStatesRandom32(id)); } public bool SetLEDIntensity(int id) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetLEDIntensities64(id, m_LEDIntensity[id]) : Pac64SetLEDIntensities32(id, m_LEDIntensity[id])); } public bool SetLEDIntensity(int id, int port, byte intensity) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetLEDIntensity64(id, port, intensity) : Pac64SetLEDIntensity32(id, port, intensity)); } public bool SetLEDFadeTime(int id, byte fadeTime) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetLEDFadeTime64(id, fadeTime) : Pac64SetLEDFadeTime32(id, fadeTime)); } public bool SetLEDFlashSpeeds(int id, FlashSpeed flashSpeed) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetLEDFlashSpeeds64(id, (byte)flashSpeed) : Pac64SetLEDFlashSpeeds32(id, (byte)flashSpeed)); } public bool SetLEDFlashSpeed(int id, int port, FlashSpeed flashSpeed) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetLEDFlashSpeed64(id, port, (byte)flashSpeed) : Pac64SetLEDFlashSpeed32(id, port, (byte)flashSpeed)); } public bool StartScriptRecording(int id) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64StartScriptRecording64(id) : Pac64StartScriptRecording32(id)); } public bool StopScriptRecording(int id) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64StopScriptRecording64(id) : Pac64StopScriptRecording32(id)); } public bool SetScriptStepDelay(int id, byte stepDelay) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetScriptStepDelay64(id, stepDelay) : Pac64SetScriptStepDelay32(id, stepDelay)); } public bool RunScript(int id) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64RunScript64(id) : Pac64RunScript32(id)); } public bool ClearFlash(int id) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64ClearFlash64(id) : Pac64ClearFlash32(id)); } public bool SetDeviceId(int id, int newId) { if (id >= m_deviceCount) return false; return (m_is64Bit ? Pac64SetDeviceId64(id, newId) : Pac64SetDeviceId32(id, newId)); } public DeviceType GetDeviceType(int id) { if (id >= m_deviceCount) return DeviceType.Unknown; return (DeviceType)(m_is64Bit ? PacGetDeviceType64(id) : PacGetDeviceType32(id)); } public int GetVendorId(int id) { if (id >= m_deviceCount) return 0; return (m_is64Bit ? PacGetVendorId64(id) : PacGetVendorId32(id)); } public int GetProductId(int id) { if (id >= m_deviceCount) return 0; return (m_is64Bit ? PacGetProductId64(id) : PacGetProductId32(id)); } public int GetVersionNumber(int id) { if (id >= m_deviceCount) return 0; return (m_is64Bit ? PacGetVersionNumber64(id) : PacGetVersionNumber32(id)); } public string GetVendorName(int id) { if (id >= m_deviceCount) return String.Empty; StringBuilder sb = new StringBuilder(256); if (m_is64Bit) PacGetVendorName64(id, sb); else PacGetVendorName32(id, sb); return sb.ToString(); } public string GetProductName(int id) { if (id >= m_deviceCount) return String.Empty; StringBuilder sb = new StringBuilder(256); if (m_is64Bit) PacGetProductName64(id, sb); else PacGetProductName32(id, sb); return sb.ToString(); } public string GetSerialNumber(int id) { if (id >= m_deviceCount) return String.Empty; StringBuilder sb = new StringBuilder(256); if (m_is64Bit) PacGetSerialNumber64(id, sb); else PacGetSerialNumber32(id, sb); return sb.ToString(); } public string GetDevicePath(int id) { if (id >= m_deviceCount) return String.Empty; StringBuilder sb = new StringBuilder(256); if (m_is64Bit) PacGetDevicePath64(id, sb); else PacGetDevicePath32(id, sb); return sb.ToString(); } public bool ProgramUHid(int id, string fileName) { if (id >= m_deviceCount) return false; StringBuilder sb = new StringBuilder(fileName); return (m_is64Bit ? PacProgramUHid64(id, sb) : PacProgramUHid32(id, sb)); } public bool SetServoStik4Way() { return (m_is64Bit ? PacSetServoStik4Way64() : PacSetServoStik4Way32()); } public bool SetServoStik8Way() { return (m_is64Bit ? PacSetServoStik8Way64() : PacSetServoStik8Way32()); } public bool SetUSBButtonConfigurePermanent(int id, byte[] dataArray) { if (id >= m_deviceCount) return false; return (m_is64Bit ? USBButtonConfigurePermanent64(id, dataArray) : USBButtonConfigurePermanent32(id, dataArray)); } public bool SetUSBButtonConfigureTemporary(int id, byte[] dataArray) { if (id >= m_deviceCount) return false; return (m_is64Bit ? USBButtonConfigureTemporary64(id, dataArray) : USBButtonConfigureTemporary32(id, dataArray)); } public bool SetUSBButtonConfigureColor(int id, byte red, byte green, byte blue) { if (id >= m_deviceCount) return false; return (m_is64Bit ? USBButtonConfigureColor64(id, red, green, blue) : USBButtonConfigureColor32(id, red, green, blue)); } public bool GetUSBButtonState(int id, ref bool state) { if (id >= m_deviceCount) return false; return (m_is64Bit ? USBButtonGetState64(id, ref state) : USBButtonGetState32(id, ref state)); } public void GetLEDControllerInfo(int id, out bool isLEDController, out bool isRGB, out int ledCount, out int rgbLEDCount, out int maxBrightness) { isLEDController = false; isRGB = false; ledCount = 0; rgbLEDCount = 0; maxBrightness = 0; if (id >= m_deviceCount) return; DeviceType deviceType = GetDeviceType(id); switch (deviceType) { case DeviceType.Unknown: break; case DeviceType.PacDrive: case DeviceType.UHID: case DeviceType.BlueHID: isLEDController = true; ledCount = 16; break; case DeviceType.NanoLED: isLEDController = true; isRGB = true; ledCount = 60; rgbLEDCount = 20; maxBrightness = 255; break; case DeviceType.PacLED64: isLEDController = true; isRGB = true; ledCount = 64; rgbLEDCount = 21; maxBrightness = 255; break; case DeviceType.IPacUltimateIO: isLEDController = true; isRGB = true; ledCount = 16; rgbLEDCount = 32; maxBrightness = 255; break; case DeviceType.ServoStik: break; case DeviceType.USBButton: break; } } public bool IsPacDrive(int id) { if (id >= m_deviceCount) return false; DeviceType deviceType = GetDeviceType(id); return (deviceType == DeviceType.PacDrive || deviceType == DeviceType.UHID || deviceType == DeviceType.BlueHID); } public bool IsPac64(int id) { if (id >= m_deviceCount) return false; DeviceType deviceType = GetDeviceType(id); return (deviceType == DeviceType.NanoLED || deviceType == DeviceType.PacLED64 || deviceType == DeviceType.IPacUltimateIO); } public void SetSingleLEDState(int id, int port, bool state) { m_LEDState[id][port] = state; SetLEDStates(id); } public void SetSingleLEDIntensity(int id, int port, byte intensity) { m_LEDIntensity[id][port] = intensity; SetLEDIntensity(id); } public void SetRGBLEDIntensity(int id, int[] portArray, byte[] intensityArray) { for (int i = 0; i < portArray.Length; i++) m_LEDIntensity[id][portArray[i]] = intensityArray[i]; SetLEDIntensity(id); } public void SetRGBLEDState(int id, int[] portArray, bool[] stateArray) { for (int i = 0; i < portArray.Length; i++) m_LEDState[id][portArray[i]] = stateArray[i]; SetLEDStates(id); } public void SetLEDStateAll(bool state) { for (int i = 0; i < m_deviceCount; i++) { for (int j = 0; j < MAX_LEDCOUNT; j++) m_LEDState[i][j] = state; SetLEDStates(i); } } public void SetLEDIntensity(int id, byte[] intensityArray) { Array.Copy(intensityArray, m_LEDIntensity[id], Math.Min(intensityArray.Length, m_LEDIntensity[id].Length)); SetLEDIntensity(id); } public void SetLEDIntensityAll(byte intensity) { for (int i = 0; i < m_deviceCount; i++) { for (int j = 0; j < MAX_LEDCOUNT; j++) m_LEDIntensity[i][j] = intensity; SetLEDIntensity(i); } } #region IDisposable Members public void Dispose() { Dispose(true); GC.SuppressFinalize(this); // remove this from gc finalizer list } private void Dispose(bool disposing) { if (!this.m_disposed) // dispose once only { if (disposing) // called from Dispose { // Dispose managed resources. } // Clean up unmanaged resources here. Shutdown(); } m_disposed = true; } #endregion public int DeviceCount { get { return m_deviceCount; } } public bool[][] LEDState { get { return m_LEDState; } set { m_LEDState = value; } } public byte[][] LEDIntensity { get { return m_LEDIntensity; } set { m_LEDIntensity = value; } } private bool Is64Bit() { return Marshal.SizeOf(typeof(IntPtr)) == 8; } } }
-
Refurbished IGT (US casino tech) edge lit dynamic buttons can be had for $24 each, but you'd also need the driver board (~$100), plus reverse engineer a way to drive the displays... one day, hopefully there'll be some nice solution that can be driven with something like an pi pico/arduino nano per button, and then have them all hooked to a USB hub, something like that. Then have Oasis send out the images for each button, and a layout with the bottom buttons cropped off... shame they're so niche as a product.
-
They do look much better, last time I found some proper integrated 'display buttons' I think they were pretty expensive... I might have another search I think it'd be a bit painful trying to hook this up with MFME, something perhaps for Oasis one day if cheap display buttons become commonplace, the cost of tiny displays is going down a lot as time progresses
-
I remember seeing some pretty expensive buttons with built in displays a while back... well I had a look into it again, and while these aren't buttons, they are small and cheap! I wonder if a standard fruit machine button could be modified to house one of these, with a hard clear plastic cover... Square: Round: Ali express links: https://www.aliexpress.com/item/1005006258472043.html?aff_fcid=23a51dc57d544622b680fc78a28a8adc-1717923506685-05574-_Dl834Gr&tt=CPS_NORMAL&aff_fsk=_Dl834Gr&aff_platform=shareComponent-detail&sk=_Dl834Gr&aff_trace_key=23a51dc57d544622b680fc78a28a8adc-1717923506685-05574-_Dl834Gr&terminal_id=90d1e9f9920b42f8b547fa7476ae1c41&afSmartRedirect=y https://www.aliexpress.com/item/1005006678263566.html?spm=a2g0o.productlist.main.33.2e76jOffjOffMV&algo_pvid=b7e514b2-432f-4790-9f86-238c2078edf8&algo_exp_id=b7e514b2-432f-4790-9f86-238c2078edf8-16&pdp_npi=4%40dis!GBP!1.78!1.78!!!16.04!16.04!%402103893b17179238461672546e2f5e!12000037992181350!sea!UK!1700116599!&curPageLogUid=t2HR7hgE0QT6&utparam-url=scene%3Asearch|query_from%3A
-
-
Nice work, you can't beat a youtube slice 'n' dice! Just yesterday I see there is a fresh video of this machine on youtube by a user Cherry Warrior ( https://www.youtube.com/watch?v=F0sOLMAP-A4 ) - he's a a bit shaky but does close up in focus footage for the most part - would need more stitching, but potentially higher resolution available, here's a quick frame I grabbed:
-
Looking nice It's good to see more folks taking an interest in making arcade simulators though I wouldn't fancy playing Gradius in the Outrun cabinet haha!
-
Wow, that is quite an ambitious project for using Playmaker Visual script! Perhaps a simple solution would be to add a 5 second delay after your room has loaded, before hiding the Loading screen? If it's around 2 seconds of 'lag' on your PC, then if you go for 5 seconds of 'fake' additional loading screen time, that should cover all use cases (other people with slower PCs), just to hide that lag away while the machines get properly started up in the background To do things at the level/performance of Arcade Simulator, you would definitely need to develop your Unity project in c# - but I'm impressed that something similar can be make using Playmaker - good job!
