CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: TFM on 01:20, 16 February 12

Title: Free Trojan Phaser for the CPCPlus
Post by: TFM on 01:20, 16 February 12
Well, I saw, there is a lightgun for the Plus. Is it doable to rebuilt such a device (the electronics, not the palstic shell)?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: MiguelSky on 09:16, 16 February 12
There was a thread in the CPC Spanish Forum about this matter:
http://amstradcpc.mforos.com/305097/6764792-amstrad-magnum-to-trojan-phazer/? (http://amstradcpc.mforos.com/305097/6764792-amstrad-magnum-to-trojan-phazer/?marcar=trojan)
Into it is mentioned a deepfb article at http://zonadepruebas.org/deepfb//ordenadores/amstrad/trojan_en.htm (http://zonadepruebas.org/deepfb//ordenadores/amstrad/trojan_en.htm) in how to build a remake from an Amstrad Magnum.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 09:44, 16 February 12
Electronically they are pretty simple to build, the problem is, they only work properly on original monitors. Anyone using LCD / SCART / S-Video / VGA solutions couldn't use it anyway.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: ralferoo on 14:48, 16 February 12
A lightpen should work on any CRT TV as long as the signal isn't delayed too much though.

For those that don't know, an old school light pen is just a latch inside the CRTC chip that stores the horizontal and vertical position of the screen beam at the point the sensor triggered. Pretty much anything that used the 6845 exposed this functionality as it's just bringing out one of the CRTC pins to an expansion port. Peripheral wise, it's essentially just an optoreceiver and a transistor.

Potentially, there's a fun homebrew project here though for someone to make a retro adaptor for LCD TVs. If you used a Wiimote and sensor bar, you'd get accurate X/Y coordinates. Coupled with a pair of counters watching the CSYNC line to keep track of the CRTC's hpos and vpos, it'd be a simple to trigger the lightpen at the exact time the beam is at the spot you're pointing at and therefore simulate to the CRTC that you're actually detecting the beam as an original light pen did.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 15:37, 16 February 12
And more easy that built a new one, it's converting one from Amiga, Atari 800, Master System, MSX, ... to Gunstick or West Phaser, the typical joyport CPC light guns (the ones using the expansion port are not different, but it could be more difficult to get the connector). Of course, you will need to power it, but it's not different that powering the Bryce mouse interface ;)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 18:08, 16 February 12
Well, a regular CPC lightpen can't be used for the Plus games (IMO, but if you know more, please tell).

Thought about getting a DIY that allows to use the Plus Cart games.

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: MacDeath on 14:07, 21 February 12
couldn't you just rewire a Sega lightgun from sega master system ?
Those are not so hard to find I guess...(well, here in france at least...)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 23:17, 22 February 12
Quote from: MacDeath on 14:07, 21 February 12
couldn't you just rewire a Sega lightgun from sega master system ?
Those are not so hard to find I guess...(well, here in france at least...)

Aehm. No. Doesn't work. But still have that Sega gun at home.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: MacDeath on 13:45, 23 February 12
doesn't work ?
Would it need a heavier rewire or re-design ?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: beaker on 15:13, 23 February 12
I notice someone has managed it with the C64 but maybe is shares some chips in common with the Master System and so that's why it works?

http://www.64hdd.com/projects/c64-proj3.html (http://www.64hdd.com/projects/c64-proj3.html)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 18:47, 23 February 12
The problem here is: How to simulate the Trojan Phaser?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: MacDeath on 19:15, 23 February 12
QuoteI notice someone has managed it with the C64 but maybe is shares some chips in common with the Master System and so that's why it works?
Like... a Z80 ?
;D
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: beaker on 20:28, 23 February 12
Quote from: MacDeath on 19:15, 23 February 12
Like... a Z80 ?
;D

lol, good point  :D  Now where did I put my dunces hat again....?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 23:28, 11 May 14
Quote from: SyX on 15:37, 16 February 12
And more easy that built a new one, it's converting one from Amiga, Atari 800, Master System, MSX, ... to Gunstick or West Phaser, the typical joyport CPC light guns (the ones using the expansion port are not different, but it could be more difficult to get the connector). Of course, you will need to power it, but it's not different that powering the Bryce mouse interface ;)

There was no usb port in development?. I'm thinking  if a modern lightgun can be used.(the modern lightgun developed to play ps2 games in lcd).

Yeah is a big up  i know :).
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 15:40, 12 May 14
Quote from: dragon on 23:28, 11 May 14
There was no usb port in development?. I'm thinking  if a modern lightgun can be used.(the modern lightgun developed to play ps2 games in lcd).

Yeah is a big up  i know :) .
It isn't a big up like a few years ago (i will explain in a few paragraphs), but of course is much more easy modify a light gun using the joyport from Amiga, Master System, Atari 800, ...  to be CPC compatible.

As i published in the spanish forums a few years ago, it's only change a few lines and get a way of powering the light gun (thanks to Amstrad forgetting to include +5V in the joyport).

First you take a look to the different systems joyport:

Pin    CPC     Atari       MSX         Amiga           SMS
---    ---     -----       ---         -----           ---
  1     Up      Up          Up          Up              Up
  2     Down    Down        Down        Down            Down
  3     Left    Left        Left        Left            Left
  4     Right   Right       Right       Right           Right
  5     Fire 3  B Input     +5V         Not Connected   +5V         
  6     Fire 2  Fire        Fire 1      Fire 1          TL
  7     Fire 1  +5V         Fire 2      +5V             TH
  8     GND     GND         Output      GND             GND
  9     GND     A Input     GND         Fire 2          TR


Then you need to know that a typical light gun use four pins, +5V and GND for power and then one that signals when you press the fire button and the other that signals when you hit a blank (the light sensor saw a white stuff :P ). The pinout of the typical light guns are:

Pin    Gun-Stick   West Phaser   Actionware   Trojan    Sega      Atari8
---    ---------   -----------   ----------   ------    ----      ------
1      -------     Hit           -------     -------   -------   Hit
2      Hit         -------       -------     -------   -------   -------
3      -------     -------       -------     Fire      -------   -------
4      -------     -------       -------     -------   -------   -------
5      -------     -------       Fire        -------   +5V       -------
6      Fire        -------       Hit         Hit       Fire      Fire
7      -------     Fire          +5V         +5V       Hit       +5V   
8      -------     -------       GND         GND       GND       GND   
9      -------     -------       -------     -------   -------   -------

A few notes:
* The Gun-Stick and West Phaser are the CPC light guns. Those use an alternative powering system, gunstick use cells and West Phaser has an adaptor to the CPC power line.
* The Actionware and Trojan are Amiga light guns.
* The Atari8 are the light guns for the 8 bits AtariSystems (2600, 800, XE,...).
* The Sega Phaser is from the Sega Master System (very easy to find with a simply search in ebay for Light Phaser 3050 (http://www.ebay.com/sch/i.html?_trksid=p2050601.m570.l1313&_nkw=Light+Phaser+3050&_sacat=0&_from=R40) or Sega Phaser) and it's my recommendation to convert. Although in the case of this gun you need make an extra change (related to the way the SMS use TH,TL and TR), you need to attach a 10K Ohm resistence between the pines 5 (+5V) and 6 (Fire) -that info is taken from the readmes of amiga whdload installers for light guns games. For a gunstick configuration would be like this:
   CPC Port
(Gunstick mode)                    SMS Gun
---------------                 ---------------
Pin 6 / Fire    <-------------> Pin 6 / Fire  <---|
Pin 2 / Hit     <-------------> Pin 7 / Hit       | 10K Ohm Resistence
Pin 8 / GND     <-------------> Pin 8 / GND       |
                                Pin 5 / +5V   <---|

NOTE: Remember that we need to power the light gun.

NOTE2: Of course, this is only for using the less accurate light guns, as the gun-stick or the west phaser, but in my opinion except Operation Wolf, the best CPC light guns games are for these guns.

Now with respect to using an USB light gun, your problem is mainly software, because the hardware side is more or less working from a few months ago. The Minibooster include an SPI port in the same pins that you connect the USB cable to communicate with the PC, you can attach there an USB module for SPI and use the functions the minibooster bios includes. Actual interface use those ports:
Minibooster SPI ports
---------------------
SPI CONTROL ($FF2D): Read/Write a byte in the SPI Control register.
SPI STATUS ($FF2E): Read SPI Status register | Write control the SS bit (bit 0)
SPI DATA ($FF2F): Read/Write a byte in the SPI Data register

In this moment my minibooster is crossing the Atlantic, but i hope being able to test and debug those in a few weeks... although my CTC-AY is comming and my first priority is this (i need some fun too :)  ).

But as i told you, your main problem is software. First, you are going to need an USB HID driver to communicate the gun with the CPC and second, you are going to need to patch the games that you want to use (in the same way that patching the west phaser games to use the gunstick or another CPC gun). But everything is available already and it's fun project for somebody wanting to take it.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 16:08, 12 May 14
I doubt it's as simple as that for a USB gun. The guns that work on LCD/TFT etc probably have very little intelligence built in, because the computer it's connected to has a massive CPU, so the intelligence is probably there. That means that your USB host will not only need USB HID firmware, but also the code to interpret the messages it's getting from the gun and match this with the CPCs sync signal to trigger the fire signal at exactly the right time. This would also require access to signals inside the CPC that aren't routed to any port, so a purely external solution isn't possible.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Carnivius on 16:13, 12 May 14
Quote from: SyX on 15:40, 12 May 14

* The Gun-Stick and West Pasher are the CPC light guns. Those use an alternative powering system, gunstick use cells and West Pahser has an adaptor to the CPC power line.

I find it amusing that you typoed 'phaser' in two slightly different ways in the same line.  That 'h' just didn't want to get in the right place there. :)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 16:59, 12 May 14
Bryce, everything is going to depend in the information the gun sends. At least, the one that i tried a few years ago (in a linux mame cabinet), it only sent the fire buttons state and the coords X and Y; that means we only would need to decode the usb packets and adjust the coords to the CPC screen in function of the calibration.

Of course, give support it in the old cpc games is other matter.

Quote from: Carnivac on 16:13, 12 May 14
I find it amusing that you typoed 'phaser' in two slightly different ways in the same line.  That 'h' just didn't want to get in the right place there. :)
FiexD :P
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 17:09, 12 May 14
I got an old Sega lightgun (guess they are much at ebay), they should be convertable more easy.

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 17:49, 12 May 14
Beautiful explanation Syx. :) But, "Yeah is a big up  i know (http://www.cpcwiki.eu/forum/Smileys/SoLoSMiLeYS1/smiley.gif)." = I know i made a big up to your post write 2 years ago!. jajaja.
....

The modern light guns supporting ps3 xbox and ps2 and pc emulates a mouse and are firmware upgradeable. Maybe is possible modify the firmware to avoid modify the games?.


Welcome to Ultimarc, the Ultimate in Arcade Controls. (http://www.ultimarc.com/aimtrak_module.html)

Ah, your post lost the sinclair gun sister of the amstrad magnum.



Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 18:59, 12 May 14
Quote from: dragon on 17:49, 12 May 14The modern light guns supporting ps3 xbox and ps2 and pc emulates a mouse and are firmware upgradeable. Maybe is possible modify the firmware to avoid modify the games?.
It´s not only a firmware question, the games are waiting for only two bits (fire and hit), you would need to make a device (with an usb port, a DB9 female and a power connector) that handles the gun usb protocol and sends to the CPC only those two bits... patching the two dozens of light gun games is a lot easier.

Quote from: dragon on 17:49, 12 May 14Ah, your post lost the sinclair gun sister of the amstrad magnum.
But i was only speaking about converting joyport light guns, where you only need to change two wires. For the others, you will need to change the connector too, in the same way that we would need for converting them to use the CPC+ AUX socket... although in this case, we don´t need to make the power hack, because AT LAST Amstrad put +5V :P
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 20:03, 12 May 14
Quote from: SyX on 16:59, 12 May 14
Bryce, everything is going to depend in the information the gun sends. At least, the one that i tried a few years ago (in a linux mame cabinet), it only sent the fire buttons state and the coords X and Y; that means we only would need to decode the usb packets and adjust the coords to the CPC screen in function of the calibration.

Of course, give support it in the old cpc games is other matter.
FiexD :P

Yes, that's one issue, the other issue is how the CPC works. The CRTC has an LPEN input, depending on when a pulse arrives, the CRTC then knows the exact position because it knows when the scan started. The USB device needs to be synchronised with the monitor sync, so you need to connect to the RGB socket and it needs to pulse the LPEN signal, so it has to be connected to the expansion port. It's not going to be pretty! :D

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 20:38, 12 May 14
Quote from: SyX on 18:59, 12 May 14
It´s not only a firmware question, the games are waiting for only two bits (fire and hit), you would need to make a device (with an usb port, a DB9 female and a power connector).
So we speak using the

I litte lost, the db9 is to connect to the joystick port?. I lost  because the two types of amstrad gun expansion port and joystick port. I never have a gun to the amstrad until now and my magnum is crossing the Pyrenees,So I thinking in the expansion port when you told me.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 20:52, 12 May 14
Whatever the solution, it will need to emulate one of the existing CPC lightguns exactly, including the port it uses. You want it to work without having to patch games. It was the same with my USB AMX Mouse adapter, I could have made a much more accurate mouse for the expansion port, but the AMX mouse used the joystick and most mouse software supports it.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 21:18, 12 May 14
Quote from: Bryce on 20:03, 12 May 14Yes, that's one issue, the other issue is how the CPC works. The CRTC has an LPEN input, depending on when a pulse arrives, the CRTC then knows the exact position because it knows when the scan started. The USB device needs to be synchronised with the monitor sync, so you need to connect to the RGB socket and it needs to pulse the LPEN signal, so it has to be connected to the expansion port. It's not going to be pretty! :D
But there is two kind of guns for CPC.

The Magnum and Trojan (more common in UK) using the hardware check (CRTC LPEN input) and the Gunstick and West Phaser (more common in Spain and France) using a software method (polling the gun sensor pins and counting cycles to know when the blank was hitted). I´m talking of the last ones.

The first type is connected to the expansion bus or in the CPC+ to the AUX connector and the second ones are connected to the joystick port.

With respect to the number of games, we have a similar quantity for both methods.

For the Magnum/Trojan, there are the next games:
Operation Wolf, Bullseye, Missile Ground Zero, Robot Attack, Rookie, Solar Invasion, American Turbo-King, Billy the Kid, Bronx Street Cop, F-16 Fighting Falcon and Jungle Warfare.

For the Trojan CPC+: Enforcer and Skeet Shoot.

For the Gunstick:
Target +, Mike Gunner, Bestial Warrior, Solo, Space Smugglers, Guillermo Tell, Trigger and The A Team.

For the West Phaser:
Westphaser/Steve McQueen.

Quote from: dragon on 20:38, 12 May 14
I litte lost, the db9 is to connect to the joystick port?. I lost  because the two types of amstrad gun expansion port and joystick port. I never have a gun to the amstrad until now and my magnum is crossing the Pyrenees,So I thinking in the expansion port when you told me.
Well, i supposed that being spanish, you were talking about gunstick, jejeje.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 22:10, 12 May 14
Quote from: SyX on 21:18, 12 May 14
Well, i supposed that being spanish, you were talking about gunstick, jejeje.

Jajaja, you don't read my post in amstrad.es? well, that's why in first time i buy the magnum to transform it to the gx4000 using the deepfb tutorial. But later, i read about operation wolf  and now i feel sorry for breaking the gun.

So I'am not sure about search another to the plus(and more later a gustick jeje). Or if other gun (as the sinclair for example, can be transformed to the cpc+).

At the same time i thinking, my ctm 644 is to "small" to play the games.And I remember the usb development and the ps2 lcd pistols guns and i ask here.

Quote
The Magnum and Trojan (more common in UK) using the hardware check (CRTC LPEN input) and the Gunstick and West Phaser (more common in Spain and France) using a software method (polling the gun sensor pins and counting cycles to know when the blank was hitted). I´m talking of the last ones.
Sorry, but i buy a non common gun jejejeje. I buy a french Magnum, and is a very rare magnum(maybe), because it comes with a different tape, an amstrad tape with the games, not the tape that appears in cpc power from mastertronic.

(http://pmcdn.priceminister.com/photo/973127665.jpg)

Anyway. Using the joystick port is best, because it can works in all computers and the gx4000 without modification.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 23:06, 12 May 14
Quote from: dragon on 22:10, 12 May 14Jajaja, you don't read my post in amstrad.es?
No, sorry, i was hoping somebody answered in the NTSC thread, before to check the new posts in the forum, because those days there is so little activity there.

Quote from: dragon on 22:10, 12 May 14well, that's why in first time i buy the magnum to transform it to the gx4000 using the deepfb tutorial. But later, i read about operation wolf  and now i feel sorry for breaking the gun.

So I'am not sure about search another to the plus(and more later a gustick jeje). Or if other gun (as the sinclair for example, can be transformed to the cpc+).
Don´t break the cpc gun, the sinclair gun (+2A, +3) should be very easy to convert to CPC, and it´s always more easy to get the CPC+ connector than the CPC bus expansion. And more reason if you think is something rare :)

Quote from: dragon on 22:10, 12 May 14Anyway. Using the joystick port is best, because it can works in all computers and the gx4000 without modification.
Technical way, the other guns have more accuracy and are more CPC friendly, but need different connectors and code for support CPC and CPC+, while the joyports no.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 00:14, 13 May 14
Quote from: SyX on 23:06, 12 May 14
Don´t break the cpc gun, the sinclair gun (+2A, +3) should be very easy to convert to CPC, and it´s always more easy to get

sinclair gun? so this magnum is not valid?.

Sinclair ZX Spectrum Magnum GUN Controller Tested Trusted Ebay Shop | eBay (http://www.ebay.ie/itm/Sinclair-ZX-Spectrum-Magnum-Gun-Controller-Tested-Trusted-Ebay-Shop-/251494116805?pt=UK_Controllers_Attachments&hash=item3a8e37adc5)

PD:who is the +2+3 sinclair gun?. I not have a spectrum.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 03:50, 13 May 14
Amstrad relabeled the Magnum/Trojan light guns for using in a few game packs that came with the CPC and the ZX Spectrum +2A/+3 (the zx spectrum computers made by Amstrad).

(http://www.dataserve-retro.co.uk/contents/media/l_light%20gun.jpg)

As you can see is identical to the Magnum. And convert them to CPC+ machines should be easy and painless, but those guns are so cheap than they look :P

PS: In reality any kind of light gun system (until snes/megadrive era) can be converted to CPC without too much difficulties.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 08:19, 13 May 14
Quote from: SyX on 21:18, 12 May 14
But there is two kind of guns for CPC.

The Magnum and Trojan (more common in UK) using the hardware check (CRTC LPEN input) and the Gunstick and West Phaser (more common in Spain and France) using a software method (polling the gun sensor pins and counting cycles to know when the blank was hitted). I´m talking of the last ones.

The first type is connected to the expansion bus or in the CPC+ to the AUX connector and the second ones are connected to the joystick port.

With respect to the number of games, we have a similar quantity for both methods.

For the Magnum/Trojan, there are the next games:
Operation Wolf, Bullseye, Missile Ground Zero, Robot Attack, Rookie, Solar Invasion, American Turbo-King, Billy the Kid, Bronx Street Cop, F-16 Fighting Falcon and Jungle Warfare.

For the Trojan CPC+: Enforcer and Skeet Shoot.

For the Gunstick:
Target +, Mike Gunner, Bestial Warrior, Solo, Space Smugglers, Guillermo Tell, Trigger and The A Team.

For the West Phaser:
Westphaser/Steve McQueen.
Well, i supposed that being spanish, you were talking about gunstick, jejeje.

The second type would be the easiest to emulate, even with a USB lightgun, but it would have to be one of the older lightguns that only worked on CRT, not the new ones with IR strips and it would still only work on CRTs. In fact it should be possible to add this functionality to the AMX Mouse adapter firmware.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TotO on 09:01, 13 May 14
Just build a CPC to SMS joystick adapter to invert pin7/pin9 and add a +5V jack on it to manage pin5.
Then, you can plug the ZX Lightgun w/o any hack as well as SEGA Master System controllers. (and more)

The "CTC-AY" board provide 4 pins to handle the other method using the Lightpen signal.
In a same way, a simple adapter should allow to plug the Lightgun.

Spoiler: ShowHide
[attachimg=1]
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 09:15, 13 May 14
True, but USB lightguns are much easier to find than ZX lightguns.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 10:51, 13 May 14
Quote from: SyX on 03:50, 13 May 14
Amstrad relabeled the Magnum/Trojan light guns for using in a few game packs that came with the CPC and the ZX Spectrum +2A/+3 (the zx spectrum computers made by Amstrad).

(http://www.dataserve-retro.co.uk/contents/media/l_light%20gun.jpg)

As you can see is identical to the Magnum. And convert them to CPC+ machines should be easy and painless, but those guns are so cheap than they look :P

PS: In reality any kind of light gun system (until snes/megadrive era) can be converted to CPC without too much difficulties.

So there are two types of spectrum magnum?. The magnun i Post with screws and the cheap amstrad without screws?. The ebay magnum,appears to have the +3 connector¿?., so maybe y buy these first and try  it. Anyway I found the sinclair in  dataserve and it only cost 9,20e(shipping include). So in the worst case I can take the case "good" with screws, and rehuse it in the sinclair. Because I guess that has no screws are shatter when opened.

edit: I am not sure if modify the light gun is posible. The spectrum aux port is:
1   GND
2   OUTPUT BIT 0
3   INPUT BIT 4
4   OUTPUT BIT 1
5   INPUT BIT 5
6   +12V

And the amstrad is:

1  +5V
2  /Joystick1 ???
3  Light Pen (Trojan Light Phazer: Light sensor)
4  /Fire 2   (Trojan Light Phazer: Trigger button)
5  /Fire 1   (Trojan Light Phazer: Not used) (could be menu/mode button)
6  Ground

If I understand correctly, amstrad trojan uses pin 1,2,3,5 and 6.

I  not found information about the pins used in sinclair magnum. Except this: Google Groups (https://groups.google.com/forum/#!topic/comp.sys.sinclair/HZsBaeFKZDY)

So pin 5=pin4? and pin 4=pin 3??. pin 1=pin 6?, vcc pin 12v vs 5v? uf. And what about pin 2 in asmtrad?. ???
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: SyX on 14:41, 13 May 14
Quote from: dragon on 10:51, 13 May 14
So there are two types of spectrum magnum?. The magnun i Post with screws and the cheap amstrad without screws?. The ebay magnum,appears to have the +3 connector¿?., so maybe y buy these first and try  it. Anyway I found the sinclair in  dataserve and it only cost 9,20e(shipping include). So in the worst case I can take the case "good" with screws, and rehuse it in the sinclair. Because I guess that has no screws are shatter when opened.
There is not two types, internally they are the same and the only difference is the use of screws and the sinclair/amstrad/magnum logo.

Quote from: dragon on 10:51, 13 May 14edit: I am not sure if modify the light gun is posible.
It´s possible, you only need to take your time studying both guns and both machines, and you will need to make tests to understand them. Those things happen when you want to do something that other people has not made or not published how to make it and that means work in it :)

For example, i haven´t a CPC+ Magnum/Trojan gun (only a gunstick, west phaser and a normal CPC magnum) but i'm sure is using 1,3,4 and 6. If that schematic is correct, and that is a big if, pin 2 only would be used with a two guns adaptor and in a two player simultaneously game, but there is not those in CPC+. The same way with the other fire button in the pin 5, the only CPC+ gun use only one fire button and that is pin 4.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 20:41, 13 May 14
Quote from: TotO on 09:01, 13 May 14
The "CTC-AY" board provide 4 pins to handle the other method using the Lightpen signal.
In a same way, a simple adapter should allow to plug the Lightgun.
WoW! Would be good to have more information about that. Any link?[nb]Sorry, I know I'm way to nosy and bug you all day long.[/nb]

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TotO on 21:39, 13 May 14
You got a picture into the spoiler. :)
The idea was to simply provide the pins needed to handle a Light Pen or a Light Gun on most CPC games:
TRigger, Light Sensor, Vcc, Gnd

Then, you are free to make an adapter to plug your existing gun to it.
I should provide if a model/connector is really common. (I don't know all)

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 23:45, 13 May 14
Quote from: SyX on 14:41, 13 May 14
There is not two types, internally they are the same and the only difference is the use of screws and the sinclair/amstrad/magnum logo.
It´s possible, you only need to take your time studying both guns and both machines, and you will need to make tests to understand them. Those things happen when you want to do something that other people has not made or not published how to make it and that means work in it :)

For example, i haven´t a CPC+ Magnum/Trojan gun (only a gunstick, west phaser and a normal CPC magnum) but i'm sure is using 1,3,4 and 6. If that schematic is correct, and that is a big if, pin 2 only would be used with a two guns adaptor and in a two player simultaneously game, but there is not those in CPC+. The same way with the other fire button in the pin 5, the only CPC+ gun use only one fire button and that is pin 4.

Yeah, I take a look to the spectrum +3 service manual. the first problem is the vcc. Probably it only uses 3,5,6,a 1 pin. As the 3,5 are connected to tristate buffer. The gun send is the spectrum recieve, when not are in indempedanze state.

Probably it need an hardware modification in gun to work with the cpc. As the cpc only provide 5v.Depend how the gun uses de 12v,Maybe with lucky he down the vcc to 5v inside the gun :P.

Anyway the first is open the gun and made a route of the pistes and component, it no appear to big :).

(http://www.mdgames.de/Lightgun_Sinclair_open.jpg)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Gryzor on 18:14, 14 May 14
Oh, so basically a micro switch and... a shitload of glue?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TotO on 19:21, 14 May 14
So technologies!
And you don't see all the electronic inside the black box expansion connector...  :laugh:


Spoiler: ShowHide
(http://www.cpcwiki.eu/imgs/thumb/7/76/Magnum_inside_plug.jpg/800px-Magnum_inside_plug.jpg)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: MacDeath on 19:49, 14 May 14
Is this easy to put those Phone like connectors ? could be fun to get lightpens using it... for GX4000 and PLUS' alike...
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 20:46, 14 May 14
Quote from: MacDeath on 19:49, 14 May 14
Is this easy to put those Phone like connectors ? could be fun to get lightpens using it... for GX4000 and PLUS' alike...

Yes is easy. these are the material needed:

HQ TEL-0093 - Pinzas para engastar cables: VALUELINE: Amazon.es: Electrónica (http://www.amazon.es/HQ-TEL-0093-Pinzas-engastar-cables/dp/B000VQZATO/ref=sr_1_5?ie=UTF8&qid=1400095734&sr=8-5&keywords=crimpadora+6c) + MOLEX - 90075-0031 - MODULAR, PLUG, IDC, RJ11, 6P6C | eBay (http://www.ebay.es/itm/MOLEX-90075-0031-MODULAR-PLUG-IDC-RJ11-6P6C-/171329797459?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item27e40d3d53) + CABLE TELEFONICO PLANO FLEXIBLE 6 HILOS ROLLO CARRETE TELEFONO 100M NEGRO BD4335 (http://www.ebay.es/itm/CABLE-TELEFONICO-PLANO-FLEXIBLE-6-HILOS-ROLLO-CARRETE-TELEFONO-100M-NEGRO-BD4335-/350985499730?pt=LH_DefaultDomain_186&hash=item51b85db452) (well not 100m jaja)

como hacer un cable de red paso a paso crimpado o ponchado - YouTube (https://www.youtube.com/watch?v=0Y5FYcvxP60) sorry is in spanish, but yo can see it easy, the crimper to buy is rj-11, 6 contacts , the links are only expample of the orientarive prices :) .

Quote from: Gryzor on 18:14, 14 May 14
Oh, so basically a micro switch and... a shitload of glue?

Probably will be something like this:

(http://www.smspower.org/uploads/Development/lightphaser-schematic.png)
This is the schematic of sega master system gun.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 08:33, 15 May 14
The glue-laden circuit above is much simpler than Sega circuit. The two transistors on the right are most likely a cheap two stage amp and the third transistor is a TTL level switch.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 12:27, 15 May 14
That is the only picture i found about amstrad magnum. :( the upper is from spectrum gun. It only have one condenser.

(http://zonadepruebas.org/deepfb//ordenadores/amstrad/trojan2.jpg)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TotO on 12:44, 15 May 14
Is-it possible to have an unburied picture? :)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: MacDeath on 14:57, 15 May 14
I have a spare sega SMS lightphaser... got to convert it... parhaps I may find my old lightpen somewhere, not sure...
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TotO on 17:19, 15 May 14

Quote from: MacDeath on 14:57, 15 May 14
I have a spare sega SMS lightphaser... got to convert it... parhaps I may find my old lightpen somewhere, not sure...
Build a DB9 adapter to not destroy it.  ;D
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 16:18, 16 May 14
Quote from: TotO on 12:44, 15 May 14
Is-it possible to have an unburied picture? :)

I think nobody search dismount a gun that you can`t mount :( , but can be very good obtain a better picture and the schematic :s

I can ask in amstrad.es

One cuestion. ¿The magnum is compatible with all cpcs?. I found a french article about the crtc differences, and  the amstrad solution to use  varius crtc with the cpc, means the only cpcs  can read the register 16 and 17 are the equipped with the crtc 0.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 13:18, 21 May 14
O.k, so mi spectrum gun arrives.(the amstrad gun is lost wtf.)

With multimeter: pin 6 ->are connect to orange blue and green(green  by the motherboard probably)(+12v vcc?).
                         pin 5 ->red cable(trigger out -> triger are connected to  blue wire ). (0 trigger preset 1 not preset)
                         pin 4 ->not connected.
                         pin 3->connect to green, blue, orange(blue,and orange by the motherboard probably).(1 if screen refresh).
                         pin 2->connect to nothing.
                         pin 1->black wire ground.

(http://s2.subirimagenes.com/fotos/previo/thump_8921774img20140521132003.jpg)
                         
(http://s2.subirimagenes.com/fotos/previo/thump_8921773img20140521131959.jpg)

(http://s2.subirimagenes.com/fotos/previo/thump_8921772img20140521131951.jpg)
(http://s2.subirimagenes.com/fotos/previo/thump_8921771img20140521131911.jpg)

(http://s2.subirimagenes.com/fotos/previo/thump_8921805img20140521144651.jpg)

(http://s2.subirimagenes.com/fotos/previo/thump_8921808img20140521145316.jpg)
atachements are the original pictures. Sorry, I only have 32kbp upload, upload a picture take  me much time.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 13:33, 21 May 14
Although we all appreciate large clear photos... I can the resistor values on these pictures from the carpark!! Any chance you could replace the pictures with sensibly sized pictures?

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 13:37, 21 May 14
Yeah bryce I I'm on it.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 13:57, 21 May 14
Much better. If you can tell me the values of the other parts I can sketch you a quick schematic:

Numbers on transistors (Probably start with BC or 2N)
Numbers on disc capacitors (probably something like 102 or 103)
Numbers on big capacitors (something like 100/16 or 47/25)

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: arnoldemu on 14:02, 21 May 14
Quote from: dragon on 16:18, 16 May 14
One cuestion. ¿The magnum is compatible with all cpcs?. I found a french article about the crtc differences, and  the amstrad solution to use  varius crtc with the cpc, means the only cpcs  can read the register 16 and 17 are the equipped with the crtc 0.
I have read about similar things.

I will check it soon.

On all CRTC the values are readable, but because of the difference in the way the /rd,/wr signals are connected etc, this means it may not be readable on cpc.

I am also planning to do some other crtc start up checks when I get my x-mem because I will be able to write a custom firmware rom.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 14:04, 21 May 14
Quote from: Bryce on 13:57, 21 May 14
Much better. If you can tell me the values of the other parts I can sketch you a quick schematic:

Numbers on transistors (Probably start with BC or 2N)
Numbers on disc capacitors (probably something like 102 or 103)
Numbers on big capacitors (something like 100/16 or 47/25)

Bryce.
Ok bryce, what yo need :) . let my a moment.

C5=33MFD, 16WV
C4=16V
C3=104Z
C2= A litte problem the number is erased I'll make a picture, maybe 223 o 323 i am not sure.
C1=103
T4=2N3904M020
T3=T4
T2=2N3904M016
T1= unkonw light reciever
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 14:19, 21 May 14
Ok, thanks, just looking at the pictures, some of the resistor values aren't clear (despite my earlier joke). Can you tell me what those are too?

Anything more than 16V on C4?
223 will be correct for C2, no need for a picture.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 14:25, 21 May 14
Refresh, and download the last attachemts  bryce, are my  original Big picture good resolution. i think colors are good.

About c4 yeah sorry 33uf samhawa (sa) 85º

Anyway i look resistances later, I'm going to eat :)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 14:34, 21 May 14
Ok, here's the schematic. I chose a BP104 for the photodiode, which should be fine for this. TR2 / TR3 and associated parts are a two stage amplifier with filtered input. TR4 is a switch that pulls the signal (Out) low when light is detected.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 14:48, 21 May 14
Or to keep it Spanish style :)

Bryce.

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 14:53, 21 May 14
Very good schematic bryce, now the big question is posible transform the gun to cpc+?.

if i remember correcty, lpen is activaten in up latch wtf, so the contrary of the spectrum. and the 12v are the other question. In amstrad press the trigger = ¿1 or 0?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 15:01, 21 May 14
The trigger won't be a problem as long as it's connected to the correct common pin. As far as LPEN is concerned, yes, it's pulled low in the CPC+ by R114 so it is expecting a high signal, but the output signal of the lightgun could easily be inverted using either an inverter IC or even just a simple transistor.
The circuit would probably work fine on 5V if you swapped a few resistor values.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 15:25, 21 May 14
Can you made a list of componentes to change bryce?.

This can be very good article.

I do not think that there are so small protoboard to fit in the gun, so the best aproach from ic comverter can be ,The "playstation mod chip style". So yea the ic flying with a small bracket.

PD: the trigger uses 12v to.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Gryzor on 18:36, 21 May 14
A bit off-topic, but please bear with me:  that single post increased the amount of data on the server by a full 11MB. Not really worth it now, is it? Full-res pics almost never help; if there's something of importance to show, just crop the thing. And I doubt anyone would need to see a capacitor or something at a multiple-MP size...
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 18:44, 21 May 14
AgreeD. And in addition pics with too high resolution are shown either too small (thumbnail) or too big (full size). So a .png or .jpg with about couple hundred pixels in X and Y is always a good idea!

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 19:25, 21 May 14
Quote from: Gryzor on 18:36, 21 May 14
A bit off-topic, but please bear with me:  that single post increased the amount of data on the server by a full 11MB. Not really worth it now, is it? Full-res pics almost never help; if there's something of importance to show, just crop the thing. And I doubt anyone would need to see a capacitor or something at a multiple-MP size...

Well, my first intention, was link to external page, as imageshack now charges. I use  this subir imagenes, subir foto, subir imagen (http://www.subirimagenes.com/),

But I have not managed to put it as a thumbnail. That click and expand on the external server, So at first I put as attachment but cpcwiki puts the image at full screen, and edit a image adjunt in cpcwiki, means upload the picture again. So my 32kbps upload struggle for testing a reduction. So finally I put all in wirar to find a relatively quick solution  :D .


PD: view it now most slow,I think found a litte solution put first a preview, and later a hyperlink:

img20140521144651 (http://www.subirimagenes.com/fotos-img20140521144651-8921805.html)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 19:58, 21 May 14
I usually resize images to 1280xwhatever or 1920x.. if details are important. Anything bigger doesn't give any additional info really. Making sure the picture is sharp and well lit are more important than the size most of the time.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 22:21, 21 May 14
Right, sharpness is actually way more important than resolution.... are we on topic  ???
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 00:23, 22 May 14
Quote from: arnoldemu on 14:02, 21 May 14
I have read about similar things.

I will check it soon.

On all CRTC the values are readable, but because of the difference in the way the /rd,/wr signals are connected etc, this means it may not be readable on cpc.

I am also planning to do some other crtc start up checks when I get my x-mem because I will be able to write a custom firmware rom.

When the amstrad gun arrive, I try it in my all cpc, 6128 crtc 4 , and two cpc 464 with crtc 2 and 1. So the only left is the crtc 0.

I'll tell you if it does not work at all.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: arnoldemu on 09:49, 22 May 14
Quote from: dragon on 00:23, 22 May 14
When the amstrad gun arrive, I try it in my all cpc, 6128 crtc 4 , and two cpc 464 with crtc 2 and 1. So the only left is the crtc 0.

I'll tell you if it does not work at all.
great. Are you using basic to read it or use it on a game?

The reason is that for some crtc you can read using port &be00 and for some it's port &bf00.

I have a spectrum compatible lightgun and so I am also interested about how to convert it for cpc and for plus.

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 11:49, 22 May 14
I thinking in game. But I can try read it in basic.

When bryce tell change resistors, I think he tell changue de resistance to maintain the intensity of the circuit, so ttl output leves is the same.

So if R8=Voltaje/Intensity-> 1000omh(1K=1000omh)=12v/I

I=V/R->I= 12/1000=0,012 A.

So, R8new=V/I= 5V/0,012 A=416,16 omh.

But i not know if is neccesary change R5, and  R1, I don't know well the transistors.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 13:35, 22 May 14
It's not as simple as that. In fact it's quite a complicated calculation. It would be safer to build the circuit and try it in real to be certain. R8 is only a pull-up resistor, it wouldn't change. The other resistors are calculated to obtain the correct gain from the amplifier at 12V and these would need to be calculated and confirmed for a 5V supply. Are you sure the Spectrum was connected to 12V and not 5V? The circuit doesn't seem to calculate correctly for 12V at the moment.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 15:02, 22 May 14
As I not have a spectrum, I based +12v in the "aux" connector and in the service manual

ZX Spectrum Plus3 Aux - HwB (http://www.hardwarebook.info/ZX_Spectrum_Plus3_Aux)

The aux is  connected directly to the ay trough mc1489 chip


Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 15:17, 22 May 14
So this gun was to be connected to the AUX connector only, ie: it's not sending a 5V bit back to the computer, rather it's sending 12V RS232 signals back?? That would explain why I couldn't make sense of the voltage levels!

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 15:30, 22 May 14
Yes, well  exactly the spectrum have two chips between the ay. pins 3 and 5, are connected to the mc 1489 And pin 6,2,4, and 1 are connected to a MC1488. +12v its connect to a R73(100) and is the vcc of the MC1488.

And the  two are connected to ay. In the deepfb tutorial, he said he try first the spectrum gun with some rewire, And when he press the trigger the amstrad freeze but nothing more. Amstrad is not destroyed. :)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 17:56, 22 May 14
Ok, instead of breaking guns apart... Can we make an adapter for the CPC. Do Sega and Speccy guns provide all needed signals, so that an adapter for our CPC could work?

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 21:11, 22 May 14
Quote from: dragon on 15:30, 22 May 14
Yes, well  exactly the spectrum have two chips between the ay. pins 3 and 5, are connected to the mc 1489 And pin 6,2,4, and 1 are connected to a MC1488. +12v its connect to a R73(100) and is the vcc of the MC1488.

And the  two are connected to ay. In the deepfb tutorial, he said he try first the spectrum gun with some rewire, And when he press the trigger the amstrad freeze but nothing more. Amstrad is not destroyed. :)

Ok, then the circuit isn't really suitable for the CPC at all. It's tuned (light sensitivity) for 12V and outputs 12V. It would be easier to just completely replace the circuit with a small 5V solution. Then you could use a modern opamp with manual sensitivity tuning and provide both a positive and negative level output depending on what computer you wanted to connect it to. It should be simple enough to even do on a stripboard.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 20:01, 24 May 14
Leaving aside the spectrum one moment.

My amstrad gun arrive.... It not appear work very well. I tried it in my all no plus cpc. No way to hit anything wtf. Im not sure if the problem are the crtc, the gun, the ctm 644.(he not paint the vertical lines exactly straight It moves a little to the right on the bottom.) or the cpc expansion ports.

In fact it took me the trigger work. I had to take a little expansion port connector, If not only worked sometimes.
Nobody has a program or something to test the gun without using a game?.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: steve on 21:45, 24 May 14
I am not a programmer but a simple basic routine should be able to test the gun.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 21:55, 24 May 14
Well if the gun is lightpen compatible than you can move the mouse pointer under FutureOS with it. But I don't know if this is any help.

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 11:23, 25 May 14
Quote from: TFM on 21:55, 24 May 14
Well if the gun is lightpen compatible than you can move the mouse pointer under FutureOS with it. But I don't know if this is any help.

Maybe it works if i press the trigger... I try later. Amstrad Magnum Phaser - CPCWiki (http://www.cpcwiki.eu/index.php/Amstrad_Magnum_Phaser)

In basic to read/write registers the instructions are inp/out?. The amstrad mannual does not say very clear

PD: cpc wiki crtc page is wrong?. He said: 16 Light Pen Address (High) 17 Light Pen Address (High) The two are the same?.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 21:25, 25 May 14
I' cant use the cpc today. But I put the gun Under the light.

And... My gun have cataracts?

(http://s2.subirimagenes.com/otros/8927475lente-empaada2.jpg)

It may be why it does not work? I think I will not be no choice but to open it, and use the lens sinclair. wtf.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 08:11, 26 May 14
Is that a close up of the photodiode? Is the surface scratched or is the plastic cloudy?

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: arnoldemu on 13:53, 26 May 14
Quote from: dragon on 11:23, 25 May 14
Maybe it works if i press the trigger... I try later. Amstrad Magnum Phaser - CPCWiki (http://www.cpcwiki.eu/index.php/Amstrad_Magnum_Phaser)

In basic to read/write registers the instructions are inp/out?. The amstrad mannual does not say very clear
Correct.

OUT &BC00,16:? INP(&BF00)
or
OUT &BC00,16:? INP(&BE00)

and

OUT &BC00,17:? INP(&BF00)
or
OUT &BC00,17:? INP(&BE00)

the value should look like a CRTC memory address, e.g for normal screen, the range is &3000-&33ff.

Try the following:

10 MODE 1: BORDER 0
20 INK 0,0
30 INK 1,26
40 LOCATE 20,10:PRINT CHR$(24);" ";CHR$(24)
50 LOCATE 1,1: OUT &BC00,16:PRINT HEX$(INP(&BF00));
60 OUT &BC00,17:PRINT HEX$(INP(&BF00)):
70 GOTO 50

The idea here is to make a black screen with a white square which you point the gun at.
Then it reads the values and prints them on the screen. If it works correctly it should display a good value.
You could try pointing at the text too, it may not trigger well.
May need to replace &bf00 with &be00. I can't remember which is correct and it may work differently on each crtc.

If you get FFFF, or something like that or 0000, then it's not reading the values at all.

Quote from: dragon on 11:23, 25 May 14
PD: cpc wiki crtc page is wrong?. He said: 16 Light Pen Address (High) 17 Light Pen Address (High) The two are the same?.
I have fixed the wiki.

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: arnoldemu on 13:57, 26 May 14
Quote from: dragon on 11:23, 25 May 14
Maybe it works if i press the trigger... I try later. Amstrad Magnum Phaser - CPCWiki (http://www.cpcwiki.eu/index.php/Amstrad_Magnum_Phaser)

You could also try this basic program to test the trigger:

10 MODE 1
20 OUT &BC00,17:A%=INP(&BF00):OUT &FBFE,&7F: OUT &FBFE,&80:OUT &BC00,17:B%=INP(&BF00)
30 IF A%<>B% THEN BORDER 3 ELSE BORDER 4
40 GOTO 20
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 14:48, 26 May 14
Quote from: Bryce on 08:11, 26 May 14
Is that a close up of the photodiode? Is the surface scratched or is the plastic cloudy?

Bryce.

No, is the plastic lens outside fotodiode. View from cannon. Same as this but very close to the outside: Nor appear scratched,
but as spotted inside. I tried to clean it with a cloth for glasses, but was not removed anything. I'm not sure if it blocks the light or not.
(http://www.old-computers.com/museum/photos/pizon_visiomatic_101_gun.jpg)


I'll ride the cpc arnold, and test programs.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 15:13, 26 May 14
Quote from: arnoldemu on 13:53, 26 May 14
Correct.

OUT &BC00,16:? INP(&BF00)
or
OUT &BC00,16:? INP(&BE00)

and

OUT &BC00,17:? INP(&BF00)
or
OUT &BC00,17:? INP(&BE00)

the value should look like a CRTC memory address, e.g for normal screen, the range is &3000-&33ff.

Try the following:

10 MODE 1: BORDER 0
20 INK 0,0
30 INK 1,26
40 LOCATE 20,10:PRINT CHR$(24);" ";CHR$(24)
50 LOCATE 1,1: OUT &BC00,16:PRINT HEX$(INP(&BF00));
60 OUT &BC00,17:PRINT HEX$(INP(&BF00)):
70 GOTO 50

The idea here is to make a black screen with a white square which you point the gun at.
Then it reads the values and prints them on the screen. If it works correctly it should display a good value.
You could try pointing at the text too, it may not trigger well.
May need to replace &bf00 with &be00. I can't remember which is correct and it may work differently on each crtc.

If you get FFFF, or something like that or 0000, then it's not reading the values at all.
I have fixed the wiki.

Testing in the 6128 cost down.

Without gun connected return the last valor, with the gun return constantly, 3XXX changin constantly. when i press trigger, the number stop. But that all, No matter where you aim, even off screen. always 3XXX changin constantly , inclusive if i tape the gun.

Can you modify the program so, when I put trigger, cpc draw in screen the block in the site the gun is aim?.

I modify the line 50 to view, what he es reciving, without aim the gun(that is the same at not aim the gun wtf):

and: img20140526162609 (http://www.subirimagenes.com/fotos-img20140526162609-8928416.html)

It not appear pas 37xx, I only eliminate the locate, and add a print, nothing more.

The gun is alone in the table, i think is broken.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 15:45, 26 May 14
Ah, I didn't realise it had a second lense. You could try cleaning it with Displex or something similar?

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: arnoldemu on 17:09, 26 May 14
Quote from: dragon on 15:13, 26 May 14
Testing in the 6128 cost down.

Without gun connected return the last valor, with the gun return constantly, 3XXX changin constantly. when i press trigger, the number stop. But that all, No matter where you aim, even off screen. always 3XXX changin constantly , inclusive if i tape the gun.
without gun: expected
with gun and no trigger: interesting.
with gun and trigger: interesting.

CPCWiki seems to say other way around for trigger/no trigger.


Quote from: dragon on 15:13, 26 May 14
Can you modify the program so, when I put trigger, cpc draw in screen the block in the site the gun is aim?.
No.

Maybe I misunderstand what you are asking but the gun doesn't work that way.
The gun senses the white or any bright colour. This tells the CRTC to record it's position.

if the screen was black you would not get any response. So I could not tell you where it is pointing.

(On Wii, the remote has a led that shines - it's infra red?? - the sensor bar reads the light on each end. It sees two dots. The code then looks at the dots and decides where you are pointing. It's a different way that works great without needing any white rectangles on black).

In the games, when the trigger is pressed the screen goes black and one or more rectangles is shown in white. It only needs to do this for 1 frame or two.

You point the gun at the screen. The CRTC/Gate-array are drawing the screen starting at the top-left and moving to the right and down. When the gun senses the light the position is recorded by the CRTC. So if you are pointing at bottom-right and there is white there, it will take longer to sense this than if you were pointing at top-left where there is white.

The CRTC record which address it is displaying, the accuracy is 8 lines in vertical, and 1 char horizontally (8 pixels in mode 1, 4 in mode 0, 16 in mode 2).


Quote from: dragon on 15:13, 26 May 14
It not appear pas 37xx, I only eliminate the locate, and add a print, nothing more.
37xx is probably the bottom right of the screen without scrolling.
These values are crtc addresses.


Quote from: dragon on 15:13, 26 May 14
The gun is alone in the table, i think is broken.
I think it's working but I didn't expected it to work as you found. I don't have one, and I am only reading what the cpcwiki says.
I think it's saying the wrong way.

I will try and fix the code so it works the other way.

Perhaps I can also do something that will do more than one rectangle and tell you which you are pointing at.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 17:41, 26 May 14
Quote from: arnoldemu on 17:09, 26 May 14
without gun: expected
with gun and no trigger: interesting.
with gun and trigger: interesting.

CPCWiki seems to say other way around for trigger/no trigger.

No.

Maybe I misunderstand what you are asking but the gun doesn't work that way.
The gun senses the white or any bright colour. This tells the CRTC to record it's position.

if the screen was black you would not get any response. So I could not tell you where it is pointing.

(On Wii, the remote has a led that shines - it's infra red?? - the sensor bar reads the light on each end. It sees two dots. The code then looks at the dots and decides where you are pointing. It's a different way that works great without needing any white rectangles on black).

In the games, when the trigger is pressed the screen goes black and one or more rectangles is shown in white. It only needs to do this for 1 frame or two.

You point the gun at the screen. The CRTC/Gate-array are drawing the screen starting at the top-left and moving to the right and down. When the gun senses the light the position is recorded by the CRTC. So if you are pointing at bottom-right and there is white there, it will take longer to sense this than if you were pointing at top-left where there is white.

The CRTC record which address it is displaying, the accuracy is 8 lines in vertical, and 1 char horizontally (8 pixels in mode 1, 4 in mode 0, 16 in mode 2).

37xx is probably the bottom right of the screen without scrolling.
These values are crtc addresses.

I think it's working but I didn't expected it to work as you found. I don't have one, and I am only reading what the cpcwiki says.
I think it's saying the wrong way.

I will try and fix the code so it works the other way.

Perhaps I can also do something that will do more than one rectangle and tell you which you are pointing at.

Ok, but if its working, why I can't hit  nothing?.

In the game, missile laucher. first draw a vertical line to calibrate de gun, and in the game, when you shot and fail, you see in the screen a "explosion" where you fail, well, i shot, and i not view nothing, only the flashes of the trigger. and very very ocasionally, maybe a hit shots  in the upper screen(of course. And if i tape the gun. Then, the explosions fail appear in the screen!!.


Load the menu of the six games. He are basic not protected, I can't hit. I shot a name, and nothing happen, or with lucky If i shots at one game or a corner, he select another game!, the menu call a .bin 2k, but he extract from memory the coordinate, and if you press trigger.


http://www.cpc-power.com/index.php?page=detail&num=3825 (http://www.cpc-power.com/index.php?page=detail&num=3825)

As a the gun works, but he not works as he  expected to work, very strange. I do not expect an accuracy of 100% gun. But now is at 1%?.(and whith luck shot at crazy).
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: arnoldemu on 18:14, 26 May 14
Ok I understand. Can you try in cpc without cost down and others crtc type? Perhaps the gun is not compatible with cost down or plus.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 20:13, 26 May 14
Quote from: arnoldemu on 18:14, 26 May 14
Ok I understand. Can you try in cpc without cost down and others crtc type? Perhaps the gun is not compatible with cost down or plus.

O.k, finally it works. youre' right arnold, it works. The problem are.... the distance. The gun needs at least 1,20/30 meters to the ctm, thats mean, put the cpc wires to the ctm streched  XD. I try it around 1,10m. jajaja. That's the problem.

Hey, it works very well :). Now i can chose a game in the menu.


Title: Re: Free Trojan Phaser for the CPCPlus
Post by: arnoldemu on 20:29, 26 May 14
Quote from: dragon on 20:13, 26 May 14
O.k, finally it works. youre' right arnold, it works. The problem are.... the distance. The gun needs at least 1,20/30 meters to the ctm, thats mean, put the cpc wires to the ctm streched  XD. I try it around 1,10m. jajaja. That's the problem.

Hey, it works very well :). Now i can chose a game in the menu.
Great. I will add that info to the wiki.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 17:04, 27 May 14
Quote from: arnoldemu on 20:29, 26 May 14
Great. I will add that info to the wiki.

And add the gun not work,If the street is reflected in the monitor. More dark, more better run the gun.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 13:56, 29 May 14
At the end to not complicate my life. I have lucky, and i found another amstrad gun, So as I have to open it to transform it for the plus.

I'll do some photos to the plate to cpcwiki. :).  According as the plastic stay, and I'll see if I use her case, or the of sinclair to made my trojan phanzer.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 18:24, 02 July 14
O.k, so after two weeks I can recuperate mi second gun and future gx4000/plus gun, The seller sent it funny for me in very strange system. So when i waiting to the postman. My gun is sleeping and waiting me in a "travel agency". ???

When, now time to buy for what is missing. The crimping  cost me 7e in a Chinese shop, the next i buy is the connectors and cable. Probably they no cost more than 3e.

When i investigating the gx4000 connector, I found a small problem with the description,  the plus connector is supposedly a rj11 6 pin/wire.


Well, today thats exactly not true, because today the standar rj11 have 4pin/wire  and is made to the telephone. The true name to the plus connector is  rj12. This is a rj11 connector, but with 6pin/wire. So when you buy a crimpper and connector, search a rj12 compatible or it not work.

Now about the motherboard gun..... well, he have a crappy plastic :D. The switch is the same model of the spectrun gun.

img20140531122331 (http://www.subirimagenes.com/fotos-img20140531122331-8979171.html)
img20140526190007 (http://www.subirimagenes.com/fotos-img20140526190007-8979163.html)
img20140526190212 (http://www.subirimagenes.com/fotos-img20140526190212-8979167.html)
img20140526185948 (http://www.subirimagenes.com/fotos-img20140526185948-8979159.html)

Note: the circuit is in a spectrum gun case in the picture, but is exactly the same.

Now One question about tutorial: How to build a Trojan Phazer gun from an Amstrad Magnum (http://zonadepruebas.org/deepfb//ordenadores/amstrad/trojan_en.htm)

33mf/16 or 47mf/25 capacitator?.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 08:36, 03 July 14
It doesn't really matter, both 33µf/16 or 47µf/25 will work fine. If you are really short of space, then the 33µf/16 will be slightly smaller.

I think I still own an RJ11/12 crimper, so if you need any cable made in the future let me know.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: remax on 18:02, 07 August 14
I got an Amstrad Magnum for next to nothing as it was probably broken.

After some tests, as stated by the seller, i think that the trigger is working ok but the lens is not receiving the light (in every game, in can launch the game with the trigger, then have a light flash everytime i shoot but i never hit an enemy, and i'm not THAT bad at it :D )

Of course i'm in a dark room and at a good distance (wire stretched) from a CTM 644

Any idea for software tests that would confirm my opinion?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 20:03, 07 August 14
If it works like a lightpen, use lightpen software, you should be able to see the mouse arrow moving. The Plus version of FutureOS also supports some lighpens and lightguns. But the best thing is probably to read the CRTC registers. A simple basic program can do that.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: remax on 20:37, 07 August 14
Quote from: TFM on 20:03, 07 August 14
If it works like a lightpen, use lightpen software, you should be able to see the mouse arrow moving. The Plus version of FutureOS also supports some lighpens and lightguns.

It's the Magnum Phaser and it use the Expansion port, so hard to use both XMem and the gun (eventhough it must be possible with the passthrough port, but i dont have the good connector).

QuoteBut the best thing is probably to read the CRTC registers. A simple basic program can do that.

Yeah, i saw the progs available by arnoldemu but it doesn't work (i have a cost down CPC like dragon) but he said after writing them that the gun weren't working like he thought...
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 21:03, 07 August 14
Well, you should try it with the Plus. I also have one 6128 which makes troubles using lightpen/lightgun, while it works with the Plus.

Title: Re: Free Trojan Phaser for the CPCPlus
Post by: remax on 21:29, 07 August 14
Quote from: TFM on 21:03, 07 August 14
Well, you should try it with the Plus. I also have one 6128 which makes troubles using lightpen/lightgun, while it works with the Plus.

I'm a little short on CPCs to do further tests implying a change of machine  :laugh:
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 21:31, 07 August 14
Everybody is kinda... but you can attend a meeting.  :)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: remax on 21:34, 07 August 14
Quote from: TFM on 21:31, 07 August 14
Everybody is kinda... but you can attend a meeting.  :)

Why not  ;)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 12:10, 08 August 14
Try putting your left hand extended parallel to the finish of the cannon. Or try pressing the plastic part where the lens with left hand.

I don't know why. But this makes the gun more guesses(inclusive en dark room).

So:
left hand--------->
gun------------->

PD: The page of the lightgun can be update with the pictures of the  motherboard :).

Amstrad Magnum Phaser - CPCWiki (http://www.cpcwiki.eu/index.php/Amstrad_Magnum_Phaser)

The other option to the interrogation picture is call mario bros. :)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: remax on 13:00, 08 August 14
Quote from: dragon on 12:10, 08 August 14
Try putting your left hand extended parallel to the finish of the cannon. Or try pressing the plastic part where the lens with left hand.

I don't know why. But this makes the gun more guesses(inclusive en dark room).

So:
left hand--------->
gun------------->

PD: The page of the lightgun can be update with the pictures of the  motherboard :) .

Amstrad Magnum Phaser - CPCWiki (http://www.cpcwiki.eu/index.php/Amstrad_Magnum_Phaser)

The other option to the interrogation picture is call mario bros. :)

Well, thanks but it doesn't change anything... I have no bad guess i have 0% guess :D

I don't know what is supposed to happen on the game menu but unlike you it doesn't choose the bad game, it does nothing at all :p
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 13:19, 08 August 14
Quote from: remax on 13:00, 08 August 14
Well, thanks but it doesn't change anything... I have no bad guess i have 0% guess :D

I don't know what is supposed to happen on the game menu but unlike you it doesn't choose the bad game, it does nothing at all :p

what game are you using to test the gun?.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: remax on 13:22, 08 August 14
Bullseye (http://www.cpcwiki.eu/index.php?title=Bullseye&action=edit&redlink=1), Missile Ground Zero (http://www.cpcwiki.eu/index.php?title=Missile_Ground_Zero&action=edit&redlink=1), Operation Wolf (http://www.cpcwiki.eu/index.php?title=Operation_Wolf&action=edit&redlink=1), Robot Attack (http://www.cpcwiki.eu/index.php?title=Robot_Attack&action=edit&redlink=1), Rookie (http://www.cpcwiki.eu/index.php?title=Rookie&action=edit&redlink=1), Solar Invasio (http://www.cpcwiki.eu/index.php?title=Solar_Invasion&action=edit&redlink=1)n

If i launch the menu nothing happen, if i launch games by run", the trigger works (white flash, i can launch the games) but i can never hit any target
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 13:24, 08 August 14
That was what happened to me, until I discovered the problem of distance.

Is the ctm 644?. The distance is dependant of the size screen, the gun view the picture inverted in the lens and reduced. If the gun not seee the entire screen it fail.

edit: I see, you have the ctm. Your lens is o.k?. My lens had cataracts, and i changed it to the spectrum gun lens. View the lens with a light.

It has to be transparent.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: remax on 13:29, 08 August 14
Quote from: dragon on 13:24, 08 August 14
That was what happened to me, until I discovered the problem of distance.

Is the ctm 644?. The distance is dependant of the size screen, the gun view the picture inverted in the lens and reduced. If the gun not seee the entire screen it fail.


Yes CTM 644, I tryed at various distance in black room but unlike you who had false detection, i have no detection at all...
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: dragon on 13:36, 08 August 14
Take in mind, open the gun has  a 99,9% of probability(if you not are macgyver).Destroy the case.

So first, clean the edge connector in the cpc. If finally you need open it to view the problem you can search a cheap sinclair gun with screws.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Optimus on 22:47, 05 November 14
I just bought the magnum lightgun and I am not sure if it works well.


I first tried some basic program based on the wiki information.
I am not sure, it seems to be opposite. I really detect trigger when old<>new. This is how it works properly for me.
Also I had to be careful about connection. At first it didn't work most of the time, because I had to lift the connector a bit behind my CPC.
Then with testing old<>new for trigger it worked, every time I pressed I flashed the border or something and it was perfect.


But I can't detect the exact position.
I ran these programs by arnoldemu with the single white box in black background. Random number of great variety around 3xxx everytime I press.


Now, later I tried the games made for this device. I can press fire to get into game, but I only see flashing when I press, even if pointing outside the screen. There is never some indication, like a sparkle sprite or circle when I shoot, to tell me that yes you are shooting at that point. So that I can see if that sprite is accurate or jumping around. But maybe because the device is faulty I am not seeing it and only see flash but not precise shooting point?


I also tried with closed lights and from as far as possible distance (the cable is not very long but I think I am at 1.2 meters already).


Also, one thing. I am using some old CRT screen. Although I am waiting to get a CPC monitor I just bought, so maybe it works well with that one (I hope).


Also, another question I don't understand. What are these edge values &7f and &80 we out? Is it edge like some X coordinate limit? Or it shouldn't matter?
I guess I can just read &10 and &11 from CRTC to get my results?
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: TFM on 17:56, 07 November 14
For testing:

- Use bright colors (foreground AND background, but especially background).
- Set gun directly on screen
- No light in room
- and...[nb]If your gun is lightpen compatible, then you can move the mouse pointer of the FutureOS Plus version with it, precise to the single character position (x) and scanline (y). Use bright background color, you can change the colors using 'Set Colors' tool on the system disc.
That allows you to see if it is off or works at all. If it doesn't work it means nothing, but if it work, then it works. ;) But there should be some simple programs in the net to ask for CRTC lightpen registers and move a pixel on screen or so.[/nb]
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: tjohnson on 23:59, 06 January 19
Quote from: Bryce on 14:34, 21 May 14
Ok, here's the schematic. I chose a BP104 for the photodiode, which should be fine for this. TR2 / TR3 and associated parts are a two stage amplifier with filtered input. TR4 is a switch that pulls the signal (Out) low when light is detected.

Bryce.

Sorry for dragging this old thread up.  I got one of these spectrum phasers which I hope to convert to work on my Amstrad.  One thing I notice is that one of the transistors is a BC183C not a 2N3904, I haven't looked up the datasheet to see if that makes much difference. Anyway I need a way to make a compatible 5v circuit for use instead.  This site seems to provide a very simple circuit - https://cpcrulez.fr/hardware_montage_8x-realisez_votre_crayon_optique.htm (https://cpcrulez.fr/hardware_montage_8x-realisez_votre_crayon_optique.htm)
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 09:17, 07 January 19
There are two differences that matter: BC183 has a much lower gain than a 2N3904, but it should be ok to use either. Secondly, the pinout is reversed, so you would need to turn the part 180° if you use a 2N3904 as a replacement.

Bryce.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: tjohnson on 23:17, 08 January 19
Quote from: Bryce on 09:17, 07 January 19
There are two differences that matter: BC183 has a much lower gain than a 2N3904, but it should be ok to use either. Secondly, the pinout is reversed, so you would need to turn the part 180° if you use a 2N3904 as a replacement.

Bryce.
Thanks Bryce are you able to help describe the circuit as setup for 12v present as the CPC needs 5v, basically I would like to get it working my my GX4000 so I can try skeet shoot!  I don't know a great deal about circuits but it looks like there is a voltage divider in the filter section, I thought transistors were there to amplify current not voltage.
Title: Re: Free Trojan Phaser for the CPCPlus
Post by: Bryce on 09:08, 09 January 19
Can you point me to the schematic you need the description for?
And yes, you are correct, transistors normally amplify current.

Bryce.
Powered by SMFPacks Menu Editor Mod