Go to file
LeapwardKoex f39fead973 Add migrating user settings for installer 2024-11-19 20:46:40 +13:00
.github/workflows Revert version changes 2024-11-19 20:35:02 +13:00
Assets Add ability to add a custom border or rainbow border to the surrounding touch sensor input area 2024-11-09 22:40:55 +13:00
Extensions Tidy up files 2024-11-09 11:30:47 +13:00
Installer Update installer to include wpfui 2024-11-16 16:43:09 +13:00
Logging Add ability to create installer using Advanced Installer 2024-11-14 21:40:30 +13:00
Managers Fix calculation for automatic positioning and rendering scales 2024-11-09 20:30:58 +13:00
Properties Add migrating user settings for installer 2024-11-19 20:46:40 +13:00
ReadMeAssets Update video assets 2024-09-07 12:18:13 +12:00
Resources Add about section and button to open log folder 2024-11-16 17:26:10 +13:00
assets Change from image to polygon for more accuracy on certain buttons 2024-04-15 22:18:01 +12:00
thirdparty programs/com0com Add delay when dragging finger across multiple buttons 2024-02-09 17:10:08 +13:00
.gitattributes Add .gitattributes, .gitignore, and README.md. 2024-02-08 17:41:20 +13:00
.gitignore Add ability to create installer using Advanced Installer 2024-11-14 21:40:30 +13:00
App.config Add migrating user settings for installer 2024-11-19 20:46:40 +13:00
App.xaml Redesign main window to be winui3 themed 2024-11-16 16:23:29 +13:00
App.xaml.cs Add ability to create installer using Advanced Installer 2024-11-14 21:40:30 +13:00
AssemblyInfo.cs Add project files. 2024-02-08 17:41:21 +13:00
LICENSE Create LICENSE 2024-02-10 13:27:15 +13:00
MainWindow.xaml Add about section and button to open log folder 2024-11-16 17:26:10 +13:00
MainWindow.xaml.cs Add migrating user settings for installer 2024-11-19 20:46:40 +13:00
MainWindowViewModel.cs Add about section and button to open log folder 2024-11-16 17:26:10 +13:00
README.jp.md Update videos in other readme 2024-09-07 12:19:28 +12:00
README.md Update README.md with better video codec 2024-09-07 12:17:12 +12:00
README.zh.md Update videos in other readme 2024-09-07 12:19:28 +12:00
TouchPanel.xaml Update installer to include wpfui 2024-11-16 16:43:09 +13:00
TouchPanel.xaml.cs Add ability to add a custom border or rainbow border to the surrounding touch sensor input area 2024-11-09 22:40:55 +13:00
WpfMaiTouchEmulator.csproj Redesign main window to be winui3 themed 2024-11-16 16:23:29 +13:00
WpfMaiTouchEmulator.sln Add project files. 2024-02-08 17:41:21 +13:00

README.md

WpfMaiTouchEmulator

A WPF C# app meant to emulate the touch sensor hardware for SDEZ MaiMai using software on a touchscreen.

README in Other Languages

How it works

The app uses com0com to install a virtual COM port pairing of COM3 - COM23. The app then connects to COM23 and emulates how the hardware touch sensor works, sending data over this port.

Demo

https://github.com/user-attachments/assets/fd0d8f08-586b-416e-8e49-7e389a08d02b

https://github.com/user-attachments/assets/1862e59b-520c-4cd5-adf4-37389a75815d

Setup

Disable Three- and four-finger touch gestures in windows (on W11 Settings -> Bluetooth & devices -> Touch)

COM3 needs to be free for this app to work as that is the port used by SDEZ. By default most people will find that COM3 is already in use by a USB Serial device. This will need to be uninstalled via Device Manager,

  1. Open Device Manager
  2. Show hidden devices. "View" -> "Show Hidden Devices" -> "Ports (COM & LPT)" -> Right click the COM3 device and uninstall.

Set DummyTouchPanel=0 in the [AM] section of your maimai .ini file.

Open the WpfMaiTouchEmulator.exe app, Install the virtual port via the "Install COM port" button, either tick the "Automatic port connecting" for the app to connect to the COM23 port on start up or press the "Connect to port" button.

If you have issues where the app can't bind to COM23 after installing the virtual port I find that restarting my PC normally fixes it.

Start SDEZ and use your touchscreen as normal.

[Optional] To avoid having to manually open the application each time, you can enable "Automatic port connecting" and add this line after @echo off in your MaiMai's start.bat file. start "" "<your path to WpfMaiTouchEmulator.exe>"

[Optional] If you're on W11 and find that left swipes sometimes open the "widgets" pane you can remove the pane by running this command as administrator winget uninstall "windows web experience pack" and following the onscreen instructions.

Installing the virtual COM ports without using the included com0com program

If you don't want to use the included install/remove virtual com actions in the app because you don't want to give admin access to this unknown app then you can achieve the same outcome by manually downloading Null-modem com0com online (version 2.2.2.0 required!) and then running this command. cd "C:\Program Files (x86)\com0com" && setupc.exe install Portname=COM3 Portname=COM23 to install the virtual port and cd "C:\Program Files (x86)\com0com" && setupc.exe uninstall to uninstall the virtual ports.

Why?

Most SDEZ don't work very will with the built in touchscreen and require either someone else to modify the SDEZ source code to get the inbuilt touch controls to work or for you to edit and recompile the .dll files. This app should work with all SDEZ versions (afaik) out of the box.

Another reason is sourcing a ITO etched panel for use as a touch sensor can be difficult and reasonable expensive.

Performance

Its ok, the app polls the touch sensor window at up to 1Khz but its running in C# so it may or may not actually be running at this speed, depending on the performance of the host machine.

As for accuracy. I'm not that good so I can't say how well it works at high levels of play but in my experience it works pretty well.

Thanks

Thanks to whowechina - mai_pico and Sucareto - Mai2Touch for the basic serial data format and touch implementation research.