CPC Rulez
https://cpcrulez.fr/forum/

[VIDEO] Amstrad Phaser modified for GX4000/CPC+
https://cpcrulez.fr/forum/viewtopic.php?f=5&t=6379
Page 2 sur 2

Auteur :  Megachur [ 30 Août 2020, 06:54 ]
Sujet du message :  Re: [VIDEO] Amstrad Phaser modified for GX4000/CPC+

markerror a écrit :
Ca doit méchamment limiter les possibilités de détection, ça. A un instant T, tu ne peux avoir qu'un sprite "blanc", non ?
Le pistolet devrait fonctionner sur un moniteur non cathodique par contre ?


:biere: Je suis content que cela serve ;-) comme je l'ai dit, un tutorial sur la programmation z80 serait le bienvenue... à moins que quelqu'un retrouve une doc technique éditeur à ce sujet ?

les différences :

Gunstick Technical :

Connects to 9pin joystick port, requires four 1.5V batteries.
Trigger Button ---> Joystick Fire 2 (Row9, Bit4)
Light Sensor ---> Joystick Down (Row9, Bit1)


WestPhaser Technical :

Connects to 9pin joystick port, and to the computers power-supply.
Trigger Button ---> Joystick Fire 1 (Row9, Bit5)
Light Sensor ---> Joystick Up (Row9, Bit0)


voilà un exemple pour le Gunstick et le WestPhaser :

pour le Gunstick, on voit bien successivement les carrés blancs s'afficher
pour le WestPhaser, visiblement, on doit pouvoir déterminer le X également car tout l'écran s'affiche en blanc sur la sélection du mode couleur ?

Pièce jointe :
Mike Gunner (S) (1988) (LightGun) (CPM) [Original]_000.png

Pièce jointe :
Mike Gunner (S) (1988) (LightGun) (CPM) [Original]_001.png

Pièce jointe :
Mike Gunner (S) (1988) (LightGun) (CPM) [Original]_002.png

Pièce jointe :
Mike Gunner (S) (1988) (LightGun) (CPM) [Original]_003.png

Pièce jointe :
Westphaser (F) (Face A) (1989) (LightGun) [Original]_001.png

Pièce jointe :
Westphaser (F) (Face A) (1989) (LightGun) [Original]_002.png



Ca à l'air d'être cela pour le West Phaser, cf https://cpcrulez.fr/games-auteur-olivier_richez-loriciel_ACPC.htm

Code :
Moi : Enfin… J’y pense avec ce que tu viens de dire, on peut avoir une idée bien précise pour la position verticale du pistolet par rapport à l’écran, mais pour cette même position à l’horizontale ?
Lui : Très bonne question. Je vais t’expliquer le fonctionnement du West Phaser en détail. Lorsque le temps machine n’est pas utilisé pour le déplacement et la gestion des sprites, le CPC scanne le West Phaser et attend qu’on appuie sur la gâchette. Lorsque cet événement se produit, toutes les encres sont positionnées en blanc pour permettre au faisceau d’être détecté par le pistolet. Une boucle d’attente de la prochaine interruption permet de savoir où était le faisceau sur l’écran. Avec cette méthode, l’ordonnée découle de source. Pour gagner de la précision sur l’abscisse, le scanning est réalisé sur cinq lignes, ce qui affine l’abscisse du point recherché. En effet, les temps reçus entre chaque signal permettent de mieux apprécier la position du balai en horizontal.

 

Sined : Moi je trouve l’idée du West Phaser sympa. Mais tu vois, si j’étais toi, j’aurais programmé une petite routine qui donnerait la possibilité d’utiliser le pistolet dans n’importe quel jeu qui serait programmé, pourquoi pas, par les possesseurs de ce produit.
Lui : Tu vois, c’est Noël, et pour te faire plaisir, je te signale que sur la face 2 de la disquette, il existe un bon nombre de RSX qui répondent à ton désir.


je vais voir la face B de ce pas :winner: ! Ah non, rien trouvé ??? de quelle disquette il parle .( ?!

--> ah, si, j'ai trouvé : c'est la face B de Steve McQueen Westphaser :kissed: :kissed: :kissed: !!!

Auteur :  Megachur [ 30 Août 2020, 07:00 ]
Sujet du message :  Re: [VIDEO] Amstrad Phaser modified for GX4000/CPC+

voici le programme PHASER.DOC (images plus contenu du fichier basic) :magic: :biere: :

Code :
10 '
20 REM  BE AWARE THAT, there are on this screen some shadow zones
30 REM  where the phaser doesn't detect any light. this is normal
40 REM  and your program must keep this in mind.
50 '
60 REM  The phaser calibration is very important :
70 REM  The calibration routine must imperatively be recalled in
80 REM  each of your programs,and this must be done with great
90 REM  care
100 '
110 REM If your phaser doesn't work correctly, change the distance
120 REM of shooting and reset the brightness of your screen.
130 '
140 '
150 MODE 2:BORDER 1:INK 0,1:INK 1,26
160 PRINT "this program adds to the CPC basic the 5 following instructions :"
170 PRINT
180 PRINT"(1)  |GTRIG,@N%      ... to return to N% the position of the trigger :"
190 PRINT TAB(26)"0=trigger pressed, 1=trigger pulled."
200 PRINT
210 PRINT"(2)  |INGUN,@X%,@Y%  ... without pressing the trigger,
220 PRINT TAB(26)"go back into X% AND Y% the instant coordinates"
230 PRINT TAB(26)"of the impact point (0<=X%<=79, 0<=Y%<=199), or (-1)"
240 PRINT TAB(26)"if the screen is not bright enough: this function"
250 PRINT TAB(26)"is used to reset the brightness of the screen."   
260 PRINT
270 PRINT"(3)  |INPUTGUN,@X%,@Y%   waits for you to pull the trigger, and goes back" 
280 PRINT TAB(26)"in X% and Y% the impact point coordinates" 
290 PRINT TAB(26)"(0<=X%<=79, 0<=Y%<=199) (or else X%=Y%=-1 if"
300 PRINT TAB(26)"the screen is not bright enough)."
310 PRINT
320 PRINT"(4)  |GUNFLASH,N%    ... flash colour selection (N%= 0 a 26)."
330 PRINT
340 PRINT"(5)  |DECGUN,DX%,DY% ... transmission parameters of calibration of the phaser."
350 PRINT:PRINT TAB(12)"BE AWARE: those 5 functions imperatively use signed words.
360 LOCATE 25,25:PRINT"PRESS THE SPACE BAR TO CONTINUE";
370 IF INKEY$<>" " THEN 370
380 FOR t=1 TO 30:PRINT:NEXT:LOCATE 1,1
390 PRINT"the signed words used with the 3 functions |GTRIG, |INGUN, |INPUTGUN must be"
400 PRINT"preceeded of the term "+CHR$(39)+"@"+CHR$(39)+" :":PRINT"     - |GTRIG,n% is incorrect,":PRINT"     - the good way to do it is: |GTRIG,@n%"
410 PRINT:PRINT
420 PRINT"By listing this program you will find "CHR$(34)"PHASER.DOC"CHR$(34)":"
430 PRINT
440 PRINT TAB(4)"(1) a basic line taking care of the loading and initialisation"
450 PRINT TAB(8)"of the 5 functions allowing you to manage the phaser (cf rem comments)."
460 PRINT
470 PRINT TAB(4)"(2) an illustration program visulalising the impacts on the screen"
480 PRINT TAB(8)"with the help of the term "CHR$(224)", and including 2 sub-routines:"
490 PRINT TAB(14)"(a) a phaser calibration routine,"
500 PRINT TAB(14)"(b) a selection routine of the colour of the flash"
510 PRINT TAB(18)"which was designed to ameliorate the impacts detection."
520 PRINT:PRINT:PRINT
530 PRINT"Do you wish to :":PRINT
540 PRINT"    (1) start the demo program (which can be interrupted by ESC)"
550 PRINT"or  (2) copy "CHR$(34)"PHASER.DOC"CHR$(34)" on another disk"
560 a$=INKEY$:IF a$="1" THEN 700
570 IF a$<>"2" THEN 560
580 OPENOUT"d":MEMORY &8FCF:LOAD"gunrsx.bin",&8FD0
590 PRINT"Insert a formated disk in your drive, them press ENTER"
600 IF INKEY$<>CHR$(13) THEN 600
610 SAVE"PHASER.DOC":REM   Saving of the loader basic
620 SAVE"gunrsx.bin",b,&8FD0,&680
630 END
640 '
650 '
660 REM ***********************************************************
670 REM **  loading and initialisation of the 5 RSX functions :  **
680 REM ***********************************************************
690 '
700 OPENOUT"d":MEMORY &8FCF:LOAD"gunrsx.bin",&8FD0:CALL &8FD0
710 '
720 GOTO 1260:REM  Start the demo program
730 '
740 REM ***********************************************************
750 REM **        ROUTINE (a): CALIBRATION OF THE PHASER         **
760 REM ***********************************************************
770 REM ** this operation's goal is to determine the calibration **
780 REM **               parameters DX and DY :                  **
790 REM **    the shooting accuracy depends on this operation    **
800 REM ***********************************************************
810 REM
820 MODE 1:BORDER 0:INK 0,0:INK 1,26:PRINT "Calibration of the phaser :"
830 n=5:PRINT"shoot";n;"times at the center of the square"
840 PLOT 300,250:a=20:b=20:DRAWR a,0:DRAWR 0,-b:DRAWR -a,0:DRAWR 0,b
850 somx%=0:somy%=0:X%=0:Y%=0
860 |DECGUN,0,0
870 FOR a=1 TO n
880      |INPUTGUN,@X%,@Y%:IF x%<0 OR y%<0 THEN 880
890      somx%=somx%+X%:somy%=somy%+Y%
900 NEXT a 
910 DX%=somx%/n-40 : DY%=somy%/n - 90
920 |DECGUN,DX%,DY%:REM   transmission of the calibration parameters
930 RETURN 
940 '
950 '
960 REM ****************************************************
970 REM **     ROUTINE (b): choice of the flash colour    **
980 REM **    for monochrome monitor and colour monitor   **
990 REM ****************************************************
1000 '
1010 DATA 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26:'                      --- for monochrome monitor ---
1020 '
1030 DATA 0,3,1,4,6,9,7,12,10,13,15,16,2,5,11,14,8,17,18,21,19,22,24,25,20,23,26:'                        --- for colour monitor ---
1040 '
1050 MODE 2:RESTORE 1030 ' ^^^ for colour monitor
1060 INK 0,0:BORDER 0:SPEED INK 1,1:PRINT "Direct your phaser at the screen them shoot once":x%=0:y%=0
1070 gachette%=0                     :REM initialisation of the variables
1080 |GTRIG,@gachette%               :REM figures out the position of the trigger
1090 IF gachette% = 0 THEN  1080     :REM waits for the pulling of the trigger
1100 couleurflash%=0:READ coul%
1110 INK 0,coul% :BORDER coul%:FOR i=0 TO 50:NEXT i
1120 |INGUN,@x%,@y%
1130 IF x%<>-1 THEN 1150
1140 couleurflash%=couleurflash%+1:IF couleurflash%=27 THEN 1000 ELSE READ coul%:GOTO 1110
1150 FOR i=couleurflash%+1 TO couleurflash%+5: IF i>26 THEN 1160 ELSE READ coul%:NEXT i
1160 |GUNFLASH,coul%                 :REM indicates the flash colour for INPUTGUN
1170 INK 0,0:INK 1,26:BORDER 0
1180 RETURN
1190 '
1200 '
1210 REM *********************************************
1220 REM **    MAIN PROGRAM: VISUALISATION OF THE   **
1230 REM **       IMPACT POINT ON THE SCREEN        **
1240 REM *********************************************
1250 '
1260 GOSUB 1000:MODE 1 :REM  Select the brightness flash
1270 INK 0,0:BORDER 0
1280 GOSUB 820         :REM   Calibration of the phaser   
1290 MODE 1
1300 SPEED INK 1,1     :REM resets the time of the flash at its minimum
1310 |INPUTGUN,@x%,@y%
1320 PLOT 8*x%-8,2*(200-y%+4),1:TAG:PRINT CHR$(224);:TAGOFF
1330 GOTO 1310
1340 '

Auteur :  RockRiver [ 09 Fév 2021, 11:46 ]
Sujet du message :  Re: [VIDEO] Amstrad Phaser modified for GX4000/CPC+

* Comme Gunstick et Westphaser sont similaires en technologie, j'essaie de porter les jeux Westphaser sur Gunstick pour l'utiliser avec WiiZapper / Wiituka (gunstick support). Mais je suis très mauvais en assembleur Z80.

* Outre. Pensez-vous que nous pourrions créer des jeux Magnum lightgun vers les ports / mods Gx4000 / CPC + Trojan (les CPR changeant les entrées-sorties déclenchent D7 en feu de joystick) ???

Auteur :  kawickboy [ 15 Fév 2021, 09:37 ]
Sujet du message :  Re: [VIDEO] Amstrad Phaser modified for GX4000/CPC+

Le Gunstick a besoin de piles, et il est compatible spectrum/msx.
Le Westphaser sur Amiga/ST/PC se connecte sur le post RS232, apparemment ce serait la version relookée façon colt du gun américain Actionware pour Amiga (d'où les jeux Actionware réédités en France par Loriciels comme Capone ou P.O.W).

Est-ce que techniquement patcher des jeux d'un gun pour un autre est quelque chose de possible ? Genre Operation Wolf pour Gunstick ? Apparemment cela aurait été fait sur Amiga.

Page 2 sur 2 Le fuseau horaire est UTC+1 heure
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/