Sega Light Phaser

Basic and Machine Language

Moderator: Moderators

User avatar
cbmeeks
Vic 20 Amateur
Posts: 52
Joined: Tue May 18, 2004 12:36 pm
Website: http://meeks.co
Location: 8-bit Land
Occupation: Code Monkey

Sega Light Phaser

Postby cbmeeks » Fri Jun 16, 2017 7:51 pm

Hello all.

I got a Sega Light Phaser for my birthday and I thought it would be fun to see if I could get it to work on the VIC-20.

The following program doesn't really work:

Code: Select all

10 H=36870
15 V=36871
20 PRINT PEEK(H), PEEK(V)
30 GOTO 20


It just prints 129 and 0. Every now and then, when I press the button, one of the axis will show some random, odd number.

So, how do I program this thing? :-D

BTW, I realize that I need some type of contrasting white image or something similar. Not 100% sure how the Sega version compares to the NES version of light guns.

But I've been experimenting with it by shooting at really bright lights, dark areas, etc.
Cat; the other white meat.

User avatar
GreyGhost
Vic 20 Nerd
Posts: 512
Joined: Wed Oct 05, 2005 11:10 pm

Re: Sega Light Phaser

Postby GreyGhost » Fri Jun 16, 2017 8:46 pm

If your keyboard is still working and you have disk access, consider yourself lucky. IIRC, Sega peripherals have voltage on a pin that Commodores don't. Might wanna do some research to make sure.
Rob

User avatar
R'zo
Vic 20 Afficionado
Posts: 350
Joined: Fri Jan 16, 2015 11:48 pm

Re: Sega Light Phaser

Postby R'zo » Sat Jun 17, 2017 2:41 am

GreyGhost wrote:If your keyboard is still working and you have disk access, consider yourself lucky. IIRC, Sega peripherals have voltage on a pin that Commodores don't. Might wanna do some research to make sure.


There are adapters for plugging sega controllers into comodores that cut out the voltage pin.

http://www.64hdd.com/64jpx/64jpx.html
I'very seen other but I can't seem to find them at the moment.

Ultimately it would be simple to by a plug, leave out the voltage pin and make your own adapter.
R'zo
I do not believe in obsolete...

User avatar
cbmeeks
Vic 20 Amateur
Posts: 52
Joined: Tue May 18, 2004 12:36 pm
Website: http://meeks.co
Location: 8-bit Land
Occupation: Code Monkey

Re: Sega Light Phaser

Postby cbmeeks » Sat Jun 17, 2017 9:33 am

I've made that adapter before for my C64 for Genesis controllers.

I don't think that is needed for Sega Master System controllers though. I could be wrong.

I believe the Light Phaser is just a SMS controller with the directionals not connected.
Cat; the other white meat.

FriedOrange79
Vic 20 Newbie
Posts: 3
Joined: Sun Jun 18, 2017 3:49 am
Location: Australia
Occupation: Student

Re: Sega Light Phaser

Postby FriedOrange79 » Sun Jun 18, 2017 4:14 am

I've been using a Sega Master System controller with my VIC-20s for a while now and it doesn't seem to have caused any problems. Is the issue to do with the second button that these controllers have?
I also got a Light Phaser recently and wondered about using it with the VIC, since the light pen I attempted to build earlier gave similar rubbish results!

User avatar
R'zo
Vic 20 Afficionado
Posts: 350
Joined: Fri Jan 16, 2015 11:48 pm

Re: Sega Light Phaser

Postby R'zo » Sun Jun 18, 2017 10:35 am

FriedOrange79 wrote:I've been using a Sega Master System controller with my VIC-20s for a while now and it doesn't seem to have caused any problems. Is the issue to do with the second button that these controllers have?
I also got a Light Phaser recently and wondered about using it with the VIC, since the light pen I attempted to build earlier gave similar rubbish results!


The mega drive (genisi) has an extra voltage pin that can blow out your chips, the master system controllers are fine.
R'zo
I do not believe in obsolete...

groepaz
Vic 20 Nerd
Posts: 548
Joined: Wed Aug 25, 2010 5:30 pm

Re: Sega Light Phaser

Postby groepaz » Sun Jun 18, 2017 11:22 am

ONLY the plain old regular 2-button pads are safe... somewhat

lightgun is NOT - but it can likely be rewired to work with vic20 easily, see here

User avatar
Mike
Herr VC
Posts: 2925
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Sega Light Phaser

Postby Mike » Fri Aug 18, 2017 2:57 am

The pinout of the Sega Light Phaser is found here: http://segaretro.org/Light_Phaser

On the VIC-20 the pinout of the joystick port is different (as seen onto the computer port):

Code: Select all

Joystick port - VIC-20

  1   2   3   4   5
  o   o   o   o   o

    o   o   o   o
    6   7   8   9

1  UP
2  DOWN
3  LEFT
4  RIGHT
5  POT Y
6  FIRE/LIGHTPEN
7  +5V
8  GND
9  POT X

Lightpens for Commodore computers connect the trigger switch to one of the directions, quite often to left or up. The photo diode is connected to fire/lightpen, and both inputs are active low, i.e. when the trigger is activated or the beam spot is scanned, they're connected to GND, otherwise they're left open.

Possibly the Sega Light Phaser also needs +5 V for internal amplifiers. You'd wire the adapter as follows:

Code: Select all

  VIC-20         Light Phaser
female plug        male plug

    3 o----------------o 6
    6 o----------------o 7
    7 o----------------o 5 +5V
    8 o----------------o 8 GND

This connects the trigger switch to the left direction. Note the pin numbers always are seen as looking to the computer.

I can give no guarantee it works, though. Lightguns tend to use a different method of scanning the screen - when the trigger is pulled, the games often black out the screen except for a white rectangle where the target is, this can be detected by a rather slow photoresistor. Lightpens employ very fast photodiodes with amplifiers or phototransistors, and don't use the aforementioned screen black-out method and, of course, are used near the screen. YMMV.

As for a program to check it out, here's MINISKETCH. :mrgreen:


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest