~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/emucore/AtariVox.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-07-12 23:49:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100712234936-juawrr3etzhr2qpv
Tags: 3.1.2-1
* New maintainer (closes: #532039).
* New upstream version (closes: #461121):
  - includes launcher (closes: #396058).
* Fix the reference to the X Window System in the description (closes:
  #411815).
* Move to main, DFSG-free ROMs are available (see README.Debian).
* Enhance the package description.
* Drop the libslang2-dev dependency (closes: #560274).
* Remove the Encoding entry from stella.desktop.
* Avoid ignoring errors when cleaning.
* Add ${misc:Depends} to the package dependencies.
* Provide a doc-base file to install the documentation using doc-base.
* Switch to debhelper 7 with a simplified rules file.
* Use autotools-dev to provide updated configuration files.
* Update to Standards-Version 3.9.0:
  - Move to menu section Applications/Emulators.
  - Move the homepage declaration.
* Re-write the manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
//  SS  SS   tt   ee      ll   ll  aa  aa
9
9
//   SSSS     ttt  eeeee llll llll  aaaaa
10
10
//
11
 
// Copyright (c) 1995-2008 by Bradford W. Mott and the Stella team
 
11
// Copyright (c) 1995-2010 by Bradford W. Mott, Stephen Anthony
 
12
// and the Stella Team
12
13
//
13
 
// See the file "license" for information on usage and redistribution of
 
14
// See the file "License.txt" for information on usage and redistribution of
14
15
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
16
//
16
 
// $Id: AtariVox.cxx,v 1.20 2008/05/19 02:53:57 stephena Exp $
 
17
// $Id: AtariVox.cxx 2001 2010-04-10 21:37:23Z stephena $
17
18
//============================================================================
18
19
 
19
 
#ifdef SPEAKJET_EMULATION
20
 
  #include "SpeakJet.hxx"
21
 
#endif
22
 
 
23
20
#include "MT24LC256.hxx"
24
21
#include "SerialPort.hxx"
25
22
#include "System.hxx"
30
27
                   const SerialPort& port, const string& portname,
31
28
                   const string& eepromfile)
32
29
  : Controller(jack, event, system, Controller::AtariVox),
33
 
    mySerialPort((SerialPort*)&port),
 
30
    mySerialPort((SerialPort&)port),
34
31
    myEEPROM(NULL),
35
32
    myShiftCount(0),
36
33
    myShiftRegister(0),
37
34
    myLastDataWriteCycle(0)
38
35
{
39
 
#ifndef SPEAKJET_EMULATION
40
 
  if(mySerialPort->openPort(portname))
 
36
  if(mySerialPort.openPort(portname))
41
37
    myAboutString = " (using serial port \'" + portname + "\')";
42
38
  else
43
39
    myAboutString = " (invalid serial port \'" + portname + "\')";
44
 
#else
45
 
  mySpeakJet = new SpeakJet();
46
 
  myAboutString = " (emulating SpeakJet device)";
47
 
#endif
48
40
 
49
41
  myEEPROM = new MT24LC256(eepromfile, system);
50
42
 
57
49
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
58
50
AtariVox::~AtariVox()
59
51
{
60
 
#ifndef SPEAKJET_EMULATION
61
 
  mySerialPort->closePort();
62
 
#else
63
 
  delete mySpeakJet;
64
 
#endif
 
52
  mySerialPort.closePort();
65
53
  delete myEEPROM;
66
54
}
67
55
 
158
146
      else
159
147
      {
160
148
        uInt8 data = ((myShiftRegister >> 1) & 0xff);
161
 
    #ifndef SPEAKJET_EMULATION
162
 
        mySerialPort->writeByte(&data);
163
 
    #else
164
 
        mySpeakJet->write(data);
165
 
    #endif
 
149
        mySerialPort.writeByte(&data);
166
150
      }
167
151
      myShiftRegister = 0;
168
152
    }