djhackersdev / segatools

Loaders and hardware emulators for SEGA games that run on the Nu and ALLS platforms
The Unlicense
59 stars 6 forks source link

Add LED strip emulation #6

Open icex2 opened 4 years ago

icex2 commented 4 years ago

In GitLab by @tau on Nov 23, 2019, 18:56

This is a common PCB used by a variety of different SEGA cabinets, but Chunithm has a particular need for it since it displays a (skippable) startup error if these LED strips are not present.

icex2 commented 3 years ago

In GitLab by @warezwaldo on Feb 1, 2021, 20:46

Is there any documentation on the PCB used available anywhere?

icex2 commented 3 years ago

In GitLab by @somewhatlurker on Feb 7, 2021, 16:05

If I'm not mistaken, the relevant devices here are the 15093-06 boards, which in Chunithm should sit on COM10 and COM11 between the host and downstream LED boards, right?

I've just spent a few days trying to reverse the protocol from data and fw updates. I think I have it pretty much figured out. (Ongeki data makes for a great reference)

I'm currently working on an implementation to test it. If all goes well I'll give more details and protocol docs when it's ready.

icex2 commented 3 years ago

In GitLab by @somewhatlurker on Feb 10, 2021, 08:00

I can report that I (and some collaborators) now have a working LED strip emulator for Chunithm, in addition to enough information to make an Ongeki implementation in the future (probably).

We're currently working on finalizing how IO for it will work and integrating it with some other related changes compared to upstream.

If anyone's interested in having protocol docs ahead of code being available, please let me know and I'll get a copy uploaded.

icex2 commented 3 years ago

In GitLab by @somewhatlurker on Feb 11, 2021, 08:07

This is part of !24

icex2 commented 3 years ago

In GitLab by @somewhatlurker on Apr 30, 2021, 02:59

As you may have noticed, the old MR !24 was closed after some feature creep and potential issues.

Unfortunately skogaby and I haven't really been working on it much since then, but in the name of not letting work go to waste I thought I'd share my current state of work from way back then, which has an updated (and more generalised) LED strip emulator implementation.
It definitely needs some testing, but it's probably at least an improved foundation for LED strip stuff.

https://dev.s-ul.net/somewhatlurker/segatools/-/commit/b87fb610e02e6b4847acc00e5c7acf19a12367da

I recommend reading the full commit message (pasted below).

add led strip (16093-06) emulation for chuni+mu3, and io4 led emulation for mu3
lighting data for these games can be output over serial or named pipe

this can basically necro the lighting-related parts of the now closed djhackers/segatools!24 if tested to work fully,
as it contains the same lighting features

THIS COMMIT CONTAINS SOME CURRENTLY UNTESTED MODIFICATIONS

led strip RE+implementation by myself (only tested on chuni)
io4 led emulation work by skogaby (this is a slightly reorganised version so untested in current state)
output protocol design+pipe implementation by myself (only tested on chuni)
serial implementation by skogaby (I haven't personally tested it, but it should be working)

known issues:
this will currently be blocked from merging into master for the same reason as djhackers/segatools!28

bugfix for running slider/button leds separate to led strip: https://dev.s-ul.net/somewhatlurker/segatools/-/commit/f30e7e130900ff5e454fbc51f2d2d08e705db2db