Close

Making a 6 button loke like a 3 button or SMS controller

A project log for MEGA 2 MSX

Dual Megadrive controller adapter for MSX computers

danjovicdanjovic 07/26/2020 at 18:370 Comments

The function scanControllers( ) can detect if the controller is a 3 button or a 6 button or even a Master System SMS controller and return a 16 bit value with the following format:

// 15 14 13 12 11 10 9  8  7  6  5  4  3  2  1  0
// 0  0  0  0  MD X  Y  Z  ST A  C  B  RG LF DW UP


I have some 6 button controllers but none with 3 button neither a SMS controller, but if the pin SELECT is tied to a fixed logic state then the controller will change its behaviour, being detected as:

// SELECT = HIGH: SMS controller
// 15 14 13 12 11 10 9  8  7  6  5  4  3  2  1  0
// 0  0  0  0  0  0  0  0  0  0  C  B  1  1  DW UP


// SELECT = LOW : 3 Button controller
// 15 14 13 12 11 10 9  8  7  6  5  4  3  2  1  0
// 0  0  0  0  0  0  0  0  0  0  ST A  1  1  DW UP

Notice that 3 button controller will show LEFT an RIGHT both pressed and START and A instead of B and C, nevertheless the controller is being detected as a 3 button.

Discussions