News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_TFM

Free Trojan Phaser for the CPCPlus

Started by TFM, 01:20, 16 February 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TFM

Well, I saw, there is a lightgun for the Plus. Is it doable to rebuilt such a device (the electronics, not the palstic shell)?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MiguelSky

There was a thread in the CPC Spanish Forum about this matter:
http://amstradcpc.mforos.com/305097/6764792-amstrad-magnum-to-trojan-phazer/?
Into it is mentioned a deepfb article at http://zonadepruebas.org/deepfb//ordenadores/amstrad/trojan_en.htm in how to build a remake from an Amstrad Magnum.

Bryce

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.

ralferoo

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.

SyX

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 ;)

TFM

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.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

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...)

TFM

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.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

doesn't work ?
Would it need a heavier rewire or re-design ?

beaker

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

TFM

The problem here is: How to simulate the Trojan Phaser?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

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

beaker

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....?

dragon

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 :).

SyX

#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 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.

Bryce

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.

Carnivius

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. :)
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

SyX

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

TFM

I got an old Sega lightgun (guess they are much at ebay), they should be convertable more easy.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

dragon

Beautiful explanation Syx. :) But, "Yeah is a big up  i know :)." = 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.

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




SyX

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

Bryce

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.

dragon

#22
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.

Bryce

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.

SyX

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.

Powered by SMFPacks Menu Editor Mod