From 67edfd1aaf9c4798c4f46e9df6cd60338b9c1742 Mon Sep 17 00:00:00 2001 From: Sergio Martin Date: Sat, 27 Jan 2024 21:13:36 +0100 Subject: [PATCH] Taking back changes on controllers as joypad do report 1s after the first 8 bits as per https://www.nesdev.org/wiki/Standard_controller --- source/controller.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/controller.hpp b/source/controller.hpp index f12645e..5498e2f 100644 --- a/source/controller.hpp +++ b/source/controller.hpp @@ -137,6 +137,10 @@ public: // Pushing input code into the port port = code; + + // Adding joypad signature + // Per https://www.nesdev.org/wiki/Standard_controller, the joypad reports 1s after the first 8 bits + port |= ~0xFF; } // If its fourscore, its like two joypads separated by a |