Multi-Joystick Interface

Modding and Technical Issues

Moderator: Moderators

Post Reply
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Multi-Joystick Interface

Post by Kananga »

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. :P
Here it is:
ImageImage

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.

ImageImage

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!
User avatar
Schema
factor
Posts: 1430
Joined: Tue Mar 23, 2004 7:07 am
Website: http://www.jammingsignal.com
Location: Toronto, Ontario

Post by Schema »

This is great!
matsondawson
The Most Noble Order of Denial
Posts: 343
Joined: Fri May 01, 2009 4:44 pm

Post by matsondawson »

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.
User avatar
RobertBe
Vic 20 Elite
Posts: 2312
Joined: Sat Jul 14, 2007 2:48 pm

Re: Multi-Joystick Interface

Post by RobertBe »

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.
Hmm, I have that Protovision 4-player adapter.

Truly,
Robert Bernardo
Fresno Commodore User Group
http://videocam.net.au/fcug
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

I can't wait to see this! :shock:
High Scores, Links, and Jeff's Basic Games page.
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Re: Multi-Joystick Interface

Post by Kananga »

RobertBe wrote: Hmm, I have that Protovision 4-player adapter.
Since the adapter plugs into the user port it also works for the Vic-20 (being a 3-player adapter in that case).
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!
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

matsondawson 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.
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 joysticks :shock:
Could get a bit crowded on the screen with 256 players :P
Buy the new Bug-Wizard, the first 100 bugs are free!
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Here is a short video from the meeting. Unfortunately, the video is a bit shaky. I did not film myself, but I also lack a steady hand ;)
Buy the new Bug-Wizard, the first 100 bugs are free!
User avatar
Witzo
Vic 20 Afficionado
Posts: 381
Joined: Thu Dec 01, 2011 9:14 am
Location: The Hague

Post by Witzo »

Cool!

Reminds me of a friend who made an eight-joystick box just like yours for the Amiga, back in about 1990.
He made a game for 8 players on a screen with a maze, and then shooting each other.

But only 8, not 9 ;)
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

Witzo wrote:Reminds me of a friend who made an eight-joystick box just like yours for the Amiga, back in about 1990.
The 8-player-box works for the Amiga too. There is another cable with a plug for the printer port of the Amiga...
Buy the new Bug-Wizard, the first 100 bugs are free!
User avatar
Jeff-20
Denial Founder
Posts: 5759
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Amazing how quickly this idea was realized! Impressive! Let me be the first to make a request for Bomberman.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

I would absolutely love to see Combat from the VCS ported to the Vic each tank being controlled by 2 joysticks - just like a real tank!

Please, somebody make it happen! :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Post by Kananga »

@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.
Buy the new Bug-Wizard, the first 100 bugs are free!
Post Reply