diff --git a/Assets/dll/puae.wbx.zst b/Assets/dll/puae.wbx.zst index 4ac2e67cbb..5711f28fc6 100644 Binary files a/Assets/dll/puae.wbx.zst and b/Assets/dll/puae.wbx.zst differ diff --git a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs index 960ba528c9..08dd51e758 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.ISettable.cs @@ -238,6 +238,26 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga AppendSetting("input.mouse_speed=" + settings.MouseSpeed); AppendSetting("sound_stereo_separation=" + settings.StereoSeparation / 10); + + for (int port = 0; port <= 1; port++) + { + LibPUAE.ControllerType type = port == 0 + ? settings.ControllerPort1 + : settings.ControllerPort2; + + switch (type) + { + case LibPUAE.ControllerType.Joystick: + AppendSetting($"joyport{port}mode=djoy"); + break; + case LibPUAE.ControllerType.CD32_pad: + AppendSetting($"joyport{port}mode=cd32joy"); + break; + case LibPUAE.ControllerType.Mouse: + AppendSetting($"joyport{port}mode=mouse"); + break; + } + } } private void EnableCycleExact() diff --git a/waterbox/uae/.vscode/c_cpp_properties.json b/waterbox/uae/.vscode/c_cpp_properties.json new file mode 100644 index 0000000000..43b1dbd8c7 --- /dev/null +++ b/waterbox/uae/.vscode/c_cpp_properties.json @@ -0,0 +1,16 @@ +{ + "configurations": [ + { + "name": "Waterbox", + "includePath": [ + "${workspaceFolder}/**", + "${workspaceFolder}/../emulibc" + ], + "defines": [ + "WATERBOX" + ], + "intelliSenseMode": "gcc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/waterbox/uae/.vscode/launch.json b/waterbox/uae/.vscode/launch.json new file mode 100644 index 0000000000..d6174506f5 --- /dev/null +++ b/waterbox/uae/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Debug attach", + "type": "cppdbg", + "request": "attach", + "program": "/usr/bin/mono", + "processId": "${command:pickProcess}", + "MIMode": "gdb", + "miDebuggerPath": "/usr/bin/gdb", + "miDebuggerArgs": + "-iex \"han SIG35 nos nopr\" -iex \"han SIG36 nos nopr\" -iex \"han SIGSEGV nos nopr\"", + "setupCommands": [] + }, + ] +} \ No newline at end of file diff --git a/waterbox/uae/.vscode/settings.json b/waterbox/uae/.vscode/settings.json new file mode 100644 index 0000000000..237f96202c --- /dev/null +++ b/waterbox/uae/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.def": "c", + "*.h": "c", + } +} \ No newline at end of file diff --git a/waterbox/uae/.vscode/tasks.json b/waterbox/uae/.vscode/tasks.json new file mode 100644 index 0000000000..ea2f1ebcf8 --- /dev/null +++ b/waterbox/uae/.vscode/tasks.json @@ -0,0 +1,46 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "shell", + "label": "make-install", + "command": "make", + "args": [ + "-j8", + "install" + ], + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": false + } + }, + { + "type": "shell", + "label": "make-install-debug", + "command": "make", + "args": [ + "-j8", + "install-debug" + ], + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "type": "shell", + "label": "clean", + "command": "make", + "args": [ + "clean" + ], + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/waterbox/uae/bizhawk.c b/waterbox/uae/bizhawk.c index 5800c30197..7ca9565771 100644 --- a/waterbox/uae/bizhawk.c +++ b/waterbox/uae/bizhawk.c @@ -52,9 +52,9 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f) cd32_pad_enabled[port] = 0; joydir[port] = 0; - SetJoyButtonRaw( port, JOYBUTTON_1, controller->Buttons.b1); - SetJoyButtonRaw( port, JOYBUTTON_2, controller->Buttons.b2); - SetJoyButtonRaw( port, JOYBUTTON_3, controller->Buttons.b3); + SetJoyButtonRaw (port, JOYBUTTON_1, controller->Buttons.b1); + SetJoyButtonRaw (port, JOYBUTTON_2, controller->Buttons.b2); + SetJoyButtonRaw (port, JOYBUTTON_3, controller->Buttons.b3); SetJoyDirectionRaw(port, DIR_LEFT, controller->Buttons.left); SetJoyDirectionRaw(port, DIR_RIGHT, controller->Buttons.right); SetJoyDirectionRaw(port, DIR_UP, controller->Buttons.up); @@ -77,13 +77,12 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f) joymousecounter(port); break; case CONTROLLER_MOUSE: - mouse_delta[port][AXIS_HORIZONTAL] = controller->MouseX - last_mouse_x[port]; - mouse_delta[port][AXIS_VERTICAL] = controller->MouseY - last_mouse_y[port]; + mouse_delta[port][AXIS_HORIZONTAL] += controller->MouseX - last_mouse_x[port]; + mouse_delta[port][AXIS_VERTICAL ] += controller->MouseY - last_mouse_y[port]; + mouse_deltanoreset[port][AXIS_HORIZONTAL] = 0; + mouse_deltanoreset[port][AXIS_VERTICAL ] = 0; break; } - - mouse_deltanoreset[port][0] = 1; - mouse_deltanoreset[port][1] = 1; } for (int i = 0; i < KEY_COUNT; i++)