]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Multi-Player Soccer Manager dongle emulation
authorToni Wilen <twilen@winuae.net>
Fri, 26 May 2023 18:29:25 +0000 (21:29 +0300)
committerToni Wilen <twilen@winuae.net>
Fri, 26 May 2023 18:29:25 +0000 (21:29 +0300)
cfgfile.cpp
dongle.cpp
od-win32/win32gui.cpp

index 2cd552753add77e02b5ce9086a10cd6f1a683ee0..aa49a24b76e896b52e84827ab762b108aa837fbe 100644 (file)
@@ -212,7 +212,7 @@ static const TCHAR *dongles[] =
        _T("robocop 3"), _T("leaderboard"), _T("b.a.t. ii"), _T("italy'90 soccer"), _T("dames grand maitre"),
        _T("rugby coach"), _T("cricket captain"), _T("leviathan"), _T("musicmaster"),
        _T("logistics"), _T("scala red"), _T("scala green"),
-       _T("strikermanager"),
+       _T("strikermanager"), _T("multi-player soccer manager"),
        NULL
 };
 static const TCHAR *cdmodes[] = { _T("disabled"), _T(""), _T("image"), _T("ioctl"), _T("spti"), _T("aspi"), 0 };
index c11718c140fc3c7049a6dc29e215207b00312844..48441ef66cb3b01846ca6e416eafa57b744f60b7 100644 (file)
@@ -30,6 +30,7 @@
 #define SCALA_RED 11
 #define SCALA_GREEN 12
 #define STRIKERMANAGER 13
+#define MPSOCCERMANAGER 14
 
 static int dflag;
 static frame_time_t cycles;
@@ -102,6 +103,13 @@ Striker Manager
 - Reads JOY1DAT in a loop until AND 0x303 == 0x200 or 0x203 (opposite from previous read)
 - Resets the system if wrong value after 200 000 read attemps.
 
+Multi-Player Soccer Manager
+
+- Writes 0x0F00 to POTGO few times
+- Reads JOY1DAT, expects AND 0x303 == 0x301 or 0x302
+- Reads JOY1DAT in a loop until AND 0x303 == 0x301 or 0x302 (opposite from previous read)
+- Resets the system if wrong value after 200 000 read attemps.
+
 */
 
 static uae_u8 oldcia[2][16];
@@ -234,6 +242,18 @@ uae_u16 dongle_joydat (int port, uae_u16 val)
                        }
                }
                break;
+       case MPSOCCERMANAGER:
+               if (port == 1) {
+                       if (dflag >= 4) {
+                               val &= ~0x0303;
+                               val |= 0x0302;
+                               dflag--;
+                       } else if (dflag > 0) {
+                               val &= ~0x0303;
+                               val |= 0x0301;
+                       }
+               }
+               break;
        }
        return val;
 }
@@ -250,6 +270,7 @@ void dongle_potgo (uae_u16 val)
                dflag = (uaerand () & 7) - 3;
                break;
        case STRIKERMANAGER:
+       case MPSOCCERMANAGER:
                if ((val & 0x0500) == 0x0500) {
                        dflag++;
                } else {
index 2106e297aef6ceaae3d85cc0d4fb1fb54db17b7b..071e432d918717156ea59d84192c979e7a2a3f11 100644 (file)
@@ -17794,6 +17794,7 @@ static void init_portsdlg (HWND hDlg)
        xSendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Scala MM (Red)"));
        xSendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Scala MM (Green)"));
        xSendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Striker Manager"));
+       xSendDlgItemMessage(hDlg, IDC_DONGLELIST, CB_ADDSTRING, 0, (LPARAM)_T("Multi-Player Soccer Manager"));
 
        xSendDlgItemMessage (hDlg, IDC_SERIAL, CB_RESETCONTENT, 0, 0L);
        xSendDlgItemMessage (hDlg, IDC_SERIAL, CB_ADDSTRING, 0, (LPARAM)szNone.c_str());