1
//============================================================================
5
// SS tttttt eeee ll ll aaaa
6
// SSSS tt ee ee ll ll aa
7
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8
// SS SS tt ee ll ll aa aa
9
// SSSS ttt eeeee llll llll aaaaa
11
// Copyright (c) 1995-2012 by Bradford W. Mott, Stephen Anthony
12
// and the Stella Team
14
// See the file "License.txt" for information on usage and redistribution of
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
17
// $Id: MindLink.hxx 2322 2012-01-02 16:37:17Z stephena $
18
//============================================================================
24
#include "Control.hxx"
27
The Atari Mindlink was an unreleased video game controller intended for
28
release in 1984. The Mindlink was unique in that one had to move the
29
muscles in one's head to control the game. These movements would be read by
30
infrared sensors and transferred as movement in the game. For more
31
information, see the following link:
33
http://www.atarimuseum.com/videogames/consoles/2600/mindlink.html
35
This code was heavily borrowed from z26, and uses conventions defined
36
there. Specifically, IOPortA is treated as a complete uInt8, whereas
37
the Stella core actually stores this information in boolean arrays
38
addressable by DigitalPin number.
40
@author Stephen Anthony & z26 team
41
@version $Id: MindLink.hxx 2322 2012-01-02 16:37:17Z stephena $
43
class MindLink : public Controller
47
Create a new MindLink controller plugged into the specified jack
49
@param jack The jack the controller is plugged into
50
@param event The event object to use for events
51
@param system The system using this controller
53
MindLink(Jack jack, const Event& event, const System& system);
62
Called after *all* digital pins have been written on Port A.
64
void controlWrite() { nextMindlinkBit(); }
67
Update the entire digital and analog pin state according to the
73
void nextMindlinkBit();
76
uInt8 myMask1, myMask2, myMask3;
78
// Internal state of the port pins
81
// Position value in Mindlink controller
82
// Gets transferred bitwise (16 bits)
85
// Position for player 1 (0x2800-0x3800)
88
// Position for player 2 (0x1000-0x2000)
91
// Which bit to transfer next