It is currently Mon Dec 11, 2017 12:11 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Nov 17, 2005 8:41 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 8:56 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1393
The ROB has no actual connection to the NES. All it does is watch for rapid green flashes on the screen and move around, usually causing objects to land on the buttons of a 2nd NES controller.

One simple way to handle this is to designate 2 "controller ports" and one "expansion port" in your emulator, and connect various devices to them. The Four-Score would be a semi-special case (since it always connects to both standard ports and then only works with normal controllers), though the others would work just fine. Give each port a "read" and "write" function (two "read" functions for the expansion port) and other stuff (like "load" and "unload", "config", and "frame" to update button states from keyboard/joypads/etc.) and you'll be all set.

Incidentally, this is the exact method I use in Nintendulator, and it works quite nicely.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 9:29 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
That seems like a simple and effective setup. Heh, it seems like I'm using function pointers everywhere in this emu.

ROB sounds pretty strange... what games were designed to work with it?

Thanks for the input, Q ^^. I'm still really wondering about that barcode scanner... maybe I'll take a peek at Barcode World and see what it's doing..... tomorrow.


edit:

What about the Power glove? I never actually had one... was it the same thing as a normal controller? just in glove form?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 9:59 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19328
Location: NE Indiana, USA (NTSC)
Power Glove had a mode that emulated a normal controller. It also had a positional mode that measured the flex of each finger and the position of the hand, much like a mouse; apparently only Super Glove Ball used this.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 7:32 am 
Offline

Joined: Tue Nov 23, 2004 9:35 pm
Posts: 628
I heard there was some difference between the NES Arkanoid paddle and the Japanese Arkanoid or Arkanoid 2 paddle? An extra button perhaps?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 8:31 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3192
Location: Mountain View, CA, USA
Disch wrote:
ROB sounds pretty strange... what games were designed to work with it?


Gyromite and Stack Em.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group