Multi-Joystick Interface
Moderator: Moderators
Multi-Joystick Interface
Late at night on the last summer barbeque of Commodore users in Graz, we started playing a few multi-player games.
There are a couple of games for C-64 and the the 4-player adapter that are a lot of fun (e.g. http://www.protovision-online.de/hardw/ ... anguage=en).
I started thinking about how the adapter works and noticed that it is easily possible to extend the adapter for more joysticks.
Instead of multiplexing just between two Joysticks, with 8 I/O lines it just needs 5 inputs for the four directions and the fire button and 3 outputs to address the joystick you want to read.
I also always wanted to put some LEDs to good use, so I decided to add the 40 LEDs for all 8 Joysticks. That way, you can tell if somebody saying her joystick is broken is just making excuses.
Here it is:
After finishing my 8-player adapter I found out that there is already the MultiJoy8-Interface for Atari 800XL, but it requires two Joystick-ports that the Vic-20 doesn't have.
(It also lacks the pretty LEDs!)
Now I had 9 Joysticks connected to my Vic-20 (internal port & 8 on the interface) and needed a game for the next meeting.
Tron is simple enough, but could be tricky, because of the limited screen area and lack of enough different colors.
I finally settled on implementing a variation of Super-Amok for 9 players, using just a single room without exits and no robots.
Every player has 9 lives and the last player to live wins.
There is also a simple intro screen using the built-in font to display the game title and a scroller while playing "slow ride" by Daniel Kahlin (thanks!).
The game is rather simple, but fast paced and everybody including the kids had a lot of fun playing it.
I will release the game soon after some more polishing, but you need to build your own interface first to use it.
Or you could get MultiJoy8 and adopt it for the user port. And write more games for up to 9 players!
(EDIT: links changed to new project location)
There are a couple of games for C-64 and the the 4-player adapter that are a lot of fun (e.g. http://www.protovision-online.de/hardw/ ... anguage=en).
I started thinking about how the adapter works and noticed that it is easily possible to extend the adapter for more joysticks.
Instead of multiplexing just between two Joysticks, with 8 I/O lines it just needs 5 inputs for the four directions and the fire button and 3 outputs to address the joystick you want to read.
I also always wanted to put some LEDs to good use, so I decided to add the 40 LEDs for all 8 Joysticks. That way, you can tell if somebody saying her joystick is broken is just making excuses.
Here it is:
After finishing my 8-player adapter I found out that there is already the MultiJoy8-Interface for Atari 800XL, but it requires two Joystick-ports that the Vic-20 doesn't have.
(It also lacks the pretty LEDs!)
Now I had 9 Joysticks connected to my Vic-20 (internal port & 8 on the interface) and needed a game for the next meeting.
Tron is simple enough, but could be tricky, because of the limited screen area and lack of enough different colors.
I finally settled on implementing a variation of Super-Amok for 9 players, using just a single room without exits and no robots.
Every player has 9 lives and the last player to live wins.
There is also a simple intro screen using the built-in font to display the game title and a scroller while playing "slow ride" by Daniel Kahlin (thanks!).
The game is rather simple, but fast paced and everybody including the kids had a lot of fun playing it.
I will release the game soon after some more polishing, but you need to build your own interface first to use it.
Or you could get MultiJoy8 and adopt it for the user port. And write more games for up to 9 players!
(EDIT: links changed to new project location)
Last edited by Kananga on Sun Oct 28, 2012 12:31 pm, edited 1 time in total.
Buy the new Bug-Wizard, the first 100 bugs are free!
- Schema
- factor
- Posts: 1430
- Joined: Tue Mar 23, 2004 7:07 am
- Website: http://www.jammingsignal.com
- Location: Toronto, Ontario
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
Wow,
So the current solutions are all user port?
I'd connect the joysticks all to the standard port, and round robbin the +5v line to them, using the fire button line to toggle each successive joystick, by grounding it temporarily.
Should only require one of those led chaser chips or similar.
Or maybe simpler grounding each of joy0-3 to select any of 4 joysticks with a few transistors.
So the current solutions are all user port?
I'd connect the joysticks all to the standard port, and round robbin the +5v line to them, using the fire button line to toggle each successive joystick, by grounding it temporarily.
Should only require one of those led chaser chips or similar.
Or maybe simpler grounding each of joy0-3 to select any of 4 joysticks with a few transistors.
Re: Multi-Joystick Interface
Hmm, I have that Protovision 4-player adapter.Kananga wrote:...the 4-player adapter that are a lot of fun (e.g. http://www.protovision-online.de/hardw/ ... anguage=en). I started thinking about how the adapter works and noticed that it is easily possible to extend the adapter for more joysticks.
Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
Re: Multi-Joystick Interface
Since the adapter plugs into the user port it also works for the Vic-20 (being a 3-player adapter in that case).RobertBe wrote: Hmm, I have that Protovision 4-player adapter.
Unfortunately I know of no software for the Vic-20 making use of the additional joystick ports. The Vic GUI (VIN) can use any of the three ports, which comes in handy, if you want to use a mouse with the GUI in one of the additional ports to have the built-in port for games.
BTW, VICE also supports the Protovision 4-player adapter.
Any ideas for a 3-player game, Jeff?
Buy the new Bug-Wizard, the first 100 bugs are free!
Usual Joysticks don't use the +5V line, they just ground the respective input line. But of course, if you use the standard port for the input lines and use e.g. the 8 data lines from the user port to select a joystick, you could address up to 256 joysticksmatsondawson wrote:Wow,
So the current solutions are all user port?
I'd connect the joysticks all to the standard port, and round robbin the +5v line to them, using the fire button line to toggle each successive joystick, by grounding it temporarily.
Could get a bit crowded on the screen with 256 players
Buy the new Bug-Wizard, the first 100 bugs are free!
- Pedro Lambrini
- Vic 20 Scientist
- Posts: 1132
- Joined: Mon Dec 01, 2008 11:36 am
@Jeff: Bomberman would be great. Unfortunately it is probably slightly more effort than the simple game I wrote for the demo.
@Pedro: Combat looks nice and doable for the Vic-20. Something similar to the plane fight exists for the VIC and was one of my favourite games back then (Of course, the second player had to use the keyboard).
All in all, everything that requires more than 3 Joysticks requires a standard and available interface before being feasible. Could be based on the Atari-8-port interface, which is simple & cheap.
BTW, I did add support for the 4-player adapter to "8 player panic". Will release it once it needs less than +24K. I did not have much time for the programming, so the main optimization to achieve 50 fps (60 on NTSC) was heavy use of loop unrolling macros and pre-calculated shapes for every in-char position.
@Pedro: Combat looks nice and doable for the Vic-20. Something similar to the plane fight exists for the VIC and was one of my favourite games back then (Of course, the second player had to use the keyboard).
All in all, everything that requires more than 3 Joysticks requires a standard and available interface before being feasible. Could be based on the Atari-8-port interface, which is simple & cheap.
BTW, I did add support for the 4-player adapter to "8 player panic". Will release it once it needs less than +24K. I did not have much time for the programming, so the main optimization to achieve 50 fps (60 on NTSC) was heavy use of loop unrolling macros and pre-calculated shapes for every in-char position.
Buy the new Bug-Wizard, the first 100 bugs are free!