I'm trying to reorganize how I handle my emus input so that it'll be easier to add support for more types of controllers down the line. Initially I set it up so that 4 normal controllers would work easily... and later I worked in the Arkanoid paddle... but rather than having to rip my joypad setup apart and rebuild it every time I want to add another input device -- I figure I should plan ahead a bit and see what all needs to be handled.
So..... what I'm thinking now...
Normal Controllers (FC and NES): Up to 4 can be hooked up (controller ports 1+2 with four-score). Each read through $4016.0 (controller 1,3) or $4017.0 (controller 2,4)
NES Arkanoid Paddle: plugs in a controller port, button state read through $401x.3, paddle position read through $401x.4 (x=6 or 7 depending on which port it's plugged into)
Famicom Arkanoid Paddle: plugs into FC expansion port, button state read through $4016.1, paddle position read through $4017.1
NES Zapper: plugs into a controller port, trigger state read through $401x.4, light-sight read through $401x.3
Famicom Zapper: plugs into expansion port, trigger read through $4017.4, light read through $4017.3
Famicom Keyboard: plugs into expansion port. Writing to ?$4016.1? cycles through keyboard rows (and high/low bits of row data)... 9 real rows + 1 dummy/garbage row. Key data read through $4017.1-4
NES Power Pad: plugs into controller port. Data read through $401x.3-4
Famicom Power Pad: plugs into expansion port, data read through $4017.3-4
That's about all the info I currently have. I've tested and used above behavior for standard controllers... and both FC and NES types of paddles (in the (J) and (U) versions of Arkanoid, respectively)... but everything else is based solely on what I've read in docs -- so if you see anything that should be corrected, please speak up.
Also... there still seems to be some input devices which are scarcely documented (or not documented at all?) and I only know of their existence because of minor blips I've seen in docs. Any/all information anyone has on the following (or any other input devices I'm missing) please fill me in:
Robot Operated Buddy (R.O.B.) --- I'd assume famicom only and uses expansion port? don't know anything about this at all
Microphone --- on very old Famicom controllers... don't do anything that would affect any game, only carry the recorded sound and output it to TV speakers ???
Barcode Scanner --- FC only? Expansion port? Barcode World and mapper 96 games seem to want something like this.
So..... what I'm thinking now...
Normal Controllers (FC and NES): Up to 4 can be hooked up (controller ports 1+2 with four-score). Each read through $4016.0 (controller 1,3) or $4017.0 (controller 2,4)
NES Arkanoid Paddle: plugs in a controller port, button state read through $401x.3, paddle position read through $401x.4 (x=6 or 7 depending on which port it's plugged into)
Famicom Arkanoid Paddle: plugs into FC expansion port, button state read through $4016.1, paddle position read through $4017.1
NES Zapper: plugs into a controller port, trigger state read through $401x.4, light-sight read through $401x.3
Famicom Zapper: plugs into expansion port, trigger read through $4017.4, light read through $4017.3
Famicom Keyboard: plugs into expansion port. Writing to ?$4016.1? cycles through keyboard rows (and high/low bits of row data)... 9 real rows + 1 dummy/garbage row. Key data read through $4017.1-4
NES Power Pad: plugs into controller port. Data read through $401x.3-4
Famicom Power Pad: plugs into expansion port, data read through $4017.3-4
That's about all the info I currently have. I've tested and used above behavior for standard controllers... and both FC and NES types of paddles (in the (J) and (U) versions of Arkanoid, respectively)... but everything else is based solely on what I've read in docs -- so if you see anything that should be corrected, please speak up.
Also... there still seems to be some input devices which are scarcely documented (or not documented at all?) and I only know of their existence because of minor blips I've seen in docs. Any/all information anyone has on the following (or any other input devices I'm missing) please fill me in:
Robot Operated Buddy (R.O.B.) --- I'd assume famicom only and uses expansion port? don't know anything about this at all
Microphone --- on very old Famicom controllers... don't do anything that would affect any game, only carry the recorded sound and output it to TV speakers ???
Barcode Scanner --- FC only? Expansion port? Barcode World and mapper 96 games seem to want something like this.