Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Joystick for the CMM standardization
Page 1 of 3 | |||||
Author | Message | ||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
I am in the process of designing a CMM clone and would like to have a joystick connector on it. Maybe 2 is even better. I would suggest going for the standard 9 pin D connector. The most important however is how to wire them up. I guess Nick is the one with the most experience, what do you suggest Nick? The goal would be to have a standard joystick connection so that anyone who writes a program for the CMM can use the same routines/PINS. This will greatly improve the playability of the CMM. I would suggest using at least 2 analog capable pins per joystick port so that analog joysticks can be used too. The same as some pins are designated to have extra functionality like com ports, i2c and CAN, designating PINS to use for joysticks would be a great thing. If that is done we could ask Geoff to add joystick functionality to MM to make use of it even easier for the BASIC programmer. Microblocks. Build with logic. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
Joystick wiring information already documented here: http://www.thebackshed.com/forum/forum_posts.asp?TID=5511&PN =1 Micromites and Maximites! - Beginning Maximite |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
How did i miss that? Thanks! edit: I am not really happy with the chosen pins though. PIN12 and PIN13 are for i2c and losing that capability while connecting a joystick is not nice. Maybe a new and improved allocation of pins should be considered for a joystick (or 2). Microblocks. Build with logic. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
I have that documented in the working copy of Beginning Maximite that I have at my desk. The most recently published one (version 1.3) does not have joystick information. That is ONE defined "Atari" joystick. If there is to be a second joystick defined (perhaps in this thread) I will document that one, too. Micromites and Maximites! - Beginning Maximite |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
If i was Emperor then i would use the pins available on the arduino connectors. I think when you want to keep compatibility with the monochrome version it i simportant to leave PIN1-20 alone. If joystick feature can be added as a MMBasic function it would be nice to choose pins that are on the same PIC32 port. This will make implementing it much easier. If you look at the color maximite schematics at jumpers J2 and J3 there is a n oppertunity to use both functionalities instead of choosing. If you place the jumper for use as a I2C across pin 2 and 3. This will leave pin 1 of those free as analog ports. I would suggest to use those for the analog X/Y. It will only interfere with a pickit programmer, you would need to remove the joystick when you do that. [code] Software pin Joystick signal Pin D7 Up Pin D6 Down Pin D11 Left Pin D12 Right Pin D10 Fire Button Connector J2 pin 1 Pot X J3 pin 1 Pot Y [/code] A second joystick: [code] Software pin Joystick signal Pin D2 Up Pin D1 Down Pin D3 Left Pin D0 Right Pin D4 Fire Button Pin A0 Pot X Pin A1 Pot Y [/code] By using these pins, users of existing color Maximites and CGCOLORMAX can add joysticks as those pins are easy to access because they are not part of the external connector. Also adding the joystick connectors to the enclosure would be possible without soldering wires directly to the board. Microblocks. Build with logic. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
You are saying that joysticks are not to be used with the B&W Maximite or CGMMSTICK? Micromites and Maximites! - Beginning Maximite |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
I think, but don't know for sure, that PIN1-20 are more used for controlling other stuff then it is for using a joystick. Probably here is the best place to find that out. The Color version gives an opportunity to have the best for both. Maintain PIN1-20 compatibility and use the Color versions extra pins to have extra features, like a joystick. Maybe define an alternative pin mapping for monochrome versions but i would still refrain from using PIN 12 and PIN13. Microblocks. Build with logic. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
As it stands right now, the single joystick is implemented in Nick's game programs as I have documented it. The way I see it (some may agree or not) is that if you are using the Maximite for games, you are probably not using it for interfacing to I2C devices. Also MMBasic code to deal with the joystick is simple enough that adding specific joystick functions to MMBasic would be effort that doesn't have a lot of return. (Again, in my opinion.) If things change here, I'll update the Beginning Maximite documentation to _hopefully_ keep everyone using the joystick in the same way. Micromites and Maximites! - Beginning Maximite |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Joysticks are very handy devices in control circuits. Think robotics, CNC, motion control, etc. For that reason i think I2C is very common. For the color maximite i think it would be nice if every 'clone' and the maximite itself would use the same pins. It would make Nick - our resident game developer's- live easier. :) And i think if the color maximite ever wants to break through, it needs that type of standardization. It will promote exchange of programs and knowledge. Same as pins used for serial ports and I2C, once defined people will use them and there would be no reason to change. Microblocks. Build with logic. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
It is already defined. You are suggesting that it be changed. That would leave anybody that has already made the hardware needing to change their hardware. It would mean that MaxMan and Donut (Nick) would have to be rewritten for your joystick connections or two versions released. Micromites and Maximites! - Beginning Maximite |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
But that would still work, just use the way it is made. I see no reason why it should not work? Maybe i am focused more on having a joystick function in MMBasic, that will make it for game development and motion control much easier. There is no reason why it should not support the monochrome version for backward compatibility. A program can just ask which of the three joystick port is used, and then use those pins. Going forward however it would be nice to 'lock' some things, and i am of the opinion that using pins that are specifically I2C should never have been used for a joystick in the first place. It was probably done, accepted and never questioned. However if we move forward, and i mean specifically with the Color version, i would think it is best to set a good standard now. I have my own projects that i want to do, and seeing that two joysticks are never used on a Color maximite i would like to make one myself, all the better if others would like to use it too. At the moment i have this design in mind: I don't have all the 3d parts yet so the render is incomplete, especially the VGA connector on the top left and the microsd front center. The idc should be a right angle. Microblocks. Build with logic. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
"Maybe i am focused more on having a joystick function in MMBasic, that will make it for game development and motion control much easier." Wow. A person that can't figure out how to write a simple joystick function and need to have it be a MMBasic command probably can't write a full game anyway. This is what I think is going to hurt the Maximite: Making a bunch that are close, but incompatible with each other in some way. Making the end user have to choose to follow what has been documented here at TBS, or something else. More confusion for the end user. You are dismissing what has been done so far just because you think you have a better use of Maximite pins. This has happened before and has done a lot of damage to the Maximite. Micromites and Maximites! - Beginning Maximite |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Well lets just say you have a different opinion. As an example PIN 12 and 13 can be used as input, output or I2C. Would having a I2C function in MMBasic not make programming easier? After all, you can just manipulate the pins directly to have the same functionality. PIN 15,16,17,18 can be used as input, output and as COM1:. Would having a com1: port in MMBasic not make programming easier? After all, you can just manipulate the pins directly to have the same functionality. PIN 19 and 20 can be used as com2:. Would having a com2: port in MMBasic not make programming easier? After all, you can just manipulate the pins directly to have the same functionality. D4 and D5 can be used as input, output and as CAN. Would having a CAN function in MMBasic not make programming easier. I think we see recent proof of that. And is that detrimental to 'what has been done before'? I hope you can see what i am trying to tell. You not loose any functionality, you only gain it. Again i am not dismissing anything, just adding. Having often used algorithmes within MMBasic will not only speed things up but it would also minimize usage of RAM. Programmers would not need to worry how a joystick is connected. A function in MMBasic will make that generic. I think that is a good thing to add joystick functionality especially as its uses go beyond only games as mentioned before. I think it will bring even more joy to using a maximite and more projects will be made. Microblocks. Build with logic. |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
I can clearly see what you are saying. I could all along. I'll state my position one last time: I hope that this doesn't devolve into what happened last time. Micromites and Maximites! - Beginning Maximite |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Educate me, what happened last time? I am only a recent member. Microblocks. Build with logic. |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
I off-topic posted in Nick's (cool) blit example thread a thought about joystick connections that belongs in a thread like this one. I mused whether a joystick port could be specified with respect to say the PC pinout, using a 15 pin D-SUB instead of a 9 pin. Allows for 2 joysticks (4 analog channels) and 4 buttons, good for 2 player games. Allpinouts.org has a nice write up. 5 volt pins would be 3.3 volts instead. Standard analog PC joysticks should be cheap and easy. The big problem is that PC joysticks were wired as variable resistors, not pots. I thought I read here somewhere that a wii remote would connect via the I2C. Visit Vegipete's *Mite Library for cool programs. |
||||
Nick Guru Joined: 09/06/2011 Location: AustraliaPosts: 512 |
I like the idea of a joystick as a standard interface available for all. I personally like the good old Atari standard for the following reasons: 1) It's a standard. 2) It's supports digital (switch type) connections as well as 2 analogue (X/Y). 3) It's easy to find these joysticks on Ebay. If we go to a 15pin PC joystick standard, then we can't use these Atari/Amiga joysticks without modding the plug or adding an adaptor. Also, PC joysticks are predominantly analogue and cost more than the Atari ones. The Nunchuk is OK but not as good for gameplay as a stick/joypad. Even on the Nintendo Wii, the Nunchuck is not used as the primary controller. Besides, you have to mod the NunChuch connector to connect it to the Maximite. Any joystick solution should be accessible by all without the need to get "down-n-dirty" modding sticks and connectors, something that not every can do. We need support for an off-the-shelf stick that can be plugged in and start getting those high scores! I've supported Darthmites interface from the start. It works well and uses a standard unmodified Atari style joystick or Paddle Controller. Why complicate it any more than that? Nick P.S. With the joystick, I can easily do all 10 rounds of Donut Dilemma. |
||||
cosmic frog Senior Member Joined: 09/02/2012 Location: United KingdomPosts: 284 |
I'm with Nick on this one. The Atari/Amiga joystick is a tried and tested rock solid standed that has been with us for over 30 years, which, compliments the Maximite perfectly. |
||||
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
OK,OK I obviously need to get an Atari style joystick instead of the Nunchuk - Geoff too I think or did he quietly swap over earlier Mind you Nick, I reckon you just could have a special version of Donut Greg P.S. I think I can see merit in everyone's arguments above so I think I'll stay out of this! |
||||
MOBI Guru Joined: 02/12/2012 Location: AustraliaPosts: 819 |
On the subject of joy sticks.. I have tried to get the "space invaders" game to work and although it comes up on the screen and the little beasties shoot at me, I can't get any keyboard response. Was it written only for joystick?? I also notice with all the games that there isn't much "read.me" documentation saying how things work. And be damned if I can get past level 1 on Donut Dilema. How do you get from the upper left platform to the right? There's a dancing donut in the way and I can't jump it. Am I missing something? David M. |
||||
Page 1 of 3 |
Print this page |