Difference between revisions of "Phenix Laser Gun"

From MSX Game Library

(Created page with "== Idle mode == This is the default mode at startup. In this mode, the lightgun always return constant values. Return value: Pin 8 is HIGH: 0x3F, Pin 8 is LOW: 0x0F. Those v...")
 
Line 3: Line 3:
  
 
Return value:
 
Return value:
 +
* Pin 8 is HIGH: 0x3F,
 +
* Pin 8 is LOW: 0x0F.
  
−
Pin 8 is HIGH: 0x3F,
 
−
Pin 8 is LOW: 0x0F.
 
 
Those values have been chosed to:
 
Those values have been chosed to:
−
 
+
* allow MSX-HID protocol to detect the Phenix lightgun with the fingerprint: 0x0F,0x3F,0x0F,
−
allow MSX-HID protocol to detect the Phenix lightgun with the fingerprint: 0x0F,0x3F,0x0F,
+
* prevent lightgun from triggering joystick inputs that could interfere with the current program.
−
prevent lightgun from triggering joystick inputs that could interfere with the current program.
 
  
 
== Active mode ==
 
== Active mode ==
Line 15: Line 14:
  
 
Return value:
 
Return value:
−
 
+
<pre>
 
[ 7  6  5  4  3  2  1  0 ]
 
[ 7  6  5  4  3  2  1  0 ]
 
   x  x  B  A  L3 L2 L1 L0
 
   x  x  B  A  L3 L2 L1 L0
Line 21: Line 20:
 
         │  └────────────── Trigger A (0: pressed, 1: released)
 
         │  └────────────── Trigger A (0: pressed, 1: released)
 
         └───────────────── Trigger B (0: pressed, 1: released)
 
         └───────────────── Trigger B (0: pressed, 1: released)
 +
</pre>

Revision as of 16:16, 25 November 2026

Idle mode

This is the default mode at startup. In this mode, the lightgun always return constant values.

Return value:

  • Pin 8 is HIGH: 0x3F,
  • Pin 8 is LOW: 0x0F.

Those values have been chosed to:

  • allow MSX-HID protocol to detect the Phenix lightgun with the fingerprint: 0x0F,0x3F,0x0F,
  • prevent lightgun from triggering joystick inputs that could interfere with the current program.

Active mode

This is the normal mode to communicate between a game and the lightgun.

Return value:

[ 7  6  5  4  3  2  1  0 ]
  x  x  B  A  L3 L2 L1 L0
        │  │  └──┴──┴──┴── Light intensity (4-bit: [0:15]; 0: darker, 15: lighter)
        │  └────────────── Trigger A (0: pressed, 1: released)
        └───────────────── Trigger B (0: pressed, 1: released)