Dr. Mario has issues regarding its controller polling routine, which cause nasty bugs.
This hack fixes the input polling routine to address the following bugs:
There are separate patch files for each version (JP/US Rev0, JP/US Rev1, EU).
Version 1.1 changes the controller polling routine to only reread one controller at a time, a method used in Super Mario Bros. 3 and many other games. This reduces the likelihood of false negatives compared to rereading two controllers and the expansion port at the same time.
Note: Game Genie/Pro Action Rocky codes can be used to work around the bugs on original cartridges, thanks to the game containing unused variants of the controller polling routine. However, they have the side effect of ignoring the Famicom's expansion port. This hack was primarily made so that Famicom users have the option of using expansion port controllers (in case the hard-wired ones are broken) with a fixed polling routine.
Database match: Dr. Mario (Japan, USA) (Rev 1)
Database: No-Intro: Nintendo Entertainment System (v. 20210216-231042)
File SHA-1: 0F18C2A5760BE0647339B0E3CAB9183AF86FDD8C
File CRC32: 92BED9D7
ROM SHA-1: 59B43881456C0720E9A35E391B11C4B2C55A8F91
ROM CRC32: DE581355
Database match: Dr. Mario (Japan, USA)
Database: No-Intro: Nintendo Entertainment System (v. 20210216-231042)
File SHA-1: D51BF5CABD06FFAC94D3B72E6D9BBC0F014ECC9C
File CRC32: 556AE5C3
ROM SHA-1: FF6459BC3AF5743E3D303823999F33D74ABDF1AA
ROM CRC32: 198C2F41
Database match: Dr. Mario (Europe)
Database: No-Intro: Nintendo Entertainment System (v. 20210216-231042)
File SHA-1: E87D760B1C3402011EC0263A890E55D1E063B592
File CRC32: F7FC9505
ROM SHA-1: A0939930D9655E7FD2C3FAE69D558614F2D27480
ROM CRC32: 9735D267