mirror of https://github.com/stella-emu/stella.git
A few minor syntax and API fixes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1661 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
16b065d941
commit
a1aac4c11a
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AtariVox.cxx,v 1.21 2009-01-01 18:13:35 stephena Exp $
|
||||
// $Id: AtariVox.cxx,v 1.22 2009-01-26 21:08:05 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifdef SPEAKJET_EMULATION
|
||||
|
@ -30,14 +30,14 @@ AtariVox::AtariVox(Jack jack, const Event& event, const System& system,
|
|||
const SerialPort& port, const string& portname,
|
||||
const string& eepromfile)
|
||||
: Controller(jack, event, system, Controller::AtariVox),
|
||||
mySerialPort((SerialPort*)&port),
|
||||
mySerialPort((SerialPort&)port),
|
||||
myEEPROM(NULL),
|
||||
myShiftCount(0),
|
||||
myShiftRegister(0),
|
||||
myLastDataWriteCycle(0)
|
||||
{
|
||||
#ifndef SPEAKJET_EMULATION
|
||||
if(mySerialPort->openPort(portname))
|
||||
if(mySerialPort.openPort(portname))
|
||||
myAboutString = " (using serial port \'" + portname + "\')";
|
||||
else
|
||||
myAboutString = " (invalid serial port \'" + portname + "\')";
|
||||
|
@ -58,7 +58,7 @@ AtariVox::AtariVox(Jack jack, const Event& event, const System& system,
|
|||
AtariVox::~AtariVox()
|
||||
{
|
||||
#ifndef SPEAKJET_EMULATION
|
||||
mySerialPort->closePort();
|
||||
mySerialPort.closePort();
|
||||
#else
|
||||
delete mySpeakJet;
|
||||
#endif
|
||||
|
@ -159,7 +159,7 @@ void AtariVox::clockDataIn(bool value)
|
|||
{
|
||||
uInt8 data = ((myShiftRegister >> 1) & 0xff);
|
||||
#ifndef SPEAKJET_EMULATION
|
||||
mySerialPort->writeByte(&data);
|
||||
mySerialPort.writeByte(&data);
|
||||
#else
|
||||
mySpeakJet->write(data);
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: AtariVox.hxx,v 1.15 2009-01-01 18:13:35 stephena Exp $
|
||||
// $Id: AtariVox.hxx,v 1.16 2009-01-26 21:08:05 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef ATARIVOX_HXX
|
||||
|
@ -33,7 +33,7 @@ class MT24LC256;
|
|||
driver code.
|
||||
|
||||
@author B. Watson
|
||||
@version $Id: AtariVox.hxx,v 1.15 2009-01-01 18:13:35 stephena Exp $
|
||||
@version $Id: AtariVox.hxx,v 1.16 2009-01-26 21:08:05 stephena Exp $
|
||||
*/
|
||||
class AtariVox : public Controller
|
||||
{
|
||||
|
@ -100,15 +100,10 @@ class AtariVox : public Controller
|
|||
void shiftIn(bool value);
|
||||
|
||||
private:
|
||||
// How far off (in CPU cycles) can each write occur from when it's
|
||||
// supposed to happen? Eventually, this will become a user-settable
|
||||
// property... or it may turn out to be unnecessary.
|
||||
enum { TIMING_SLOP = 0 };
|
||||
|
||||
// Instance of an real serial port on the system
|
||||
// Assuming there's a real AtariVox attached, we can send SpeakJet
|
||||
// bytes directly to it
|
||||
SerialPort* mySerialPort;
|
||||
SerialPort& mySerialPort;
|
||||
|
||||
// The EEPROM used in the AtariVox
|
||||
MT24LC256* myEEPROM;
|
||||
|
|
|
@ -13,18 +13,20 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: M6532.cxx,v 1.30 2009-01-01 18:13:36 stephena Exp $
|
||||
// $Id: M6532.cxx,v 1.31 2009-01-26 21:08:05 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
#include "Console.hxx"
|
||||
#include "M6532.hxx"
|
||||
#include "Random.hxx"
|
||||
#include "Switches.hxx"
|
||||
#include "System.hxx"
|
||||
#include "Serializer.hxx"
|
||||
#include "Deserializer.hxx"
|
||||
#include <iostream>
|
||||
|
||||
#include "M6532.hxx"
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
M6532::M6532(const Console& console)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: MT24LC256.hxx,v 1.7 2009-01-01 18:13:36 stephena Exp $
|
||||
// $Id: MT24LC256.hxx,v 1.8 2009-01-26 21:08:05 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef MT24LC256_HXX
|
||||
|
@ -30,7 +30,7 @@ class System;
|
|||
(aka Supercat) for the bulk of this code.
|
||||
|
||||
@author Stephen Anthony & J. Payson
|
||||
@version $Id: MT24LC256.hxx,v 1.7 2009-01-01 18:13:36 stephena Exp $
|
||||
@version $Id: MT24LC256.hxx,v 1.8 2009-01-26 21:08:05 stephena Exp $
|
||||
*/
|
||||
class MT24LC256
|
||||
{
|
||||
|
@ -116,5 +116,5 @@ class MT24LC256
|
|||
// Assignment operator isn't supported by this class so make it private
|
||||
MT24LC256& operator = (const MT24LC256&);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SaveKey.hxx,v 1.3 2009-01-01 18:13:37 stephena Exp $
|
||||
// $Id: SaveKey.hxx,v 1.4 2009-01-26 21:08:05 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef SAVEKEY_HXX
|
||||
|
@ -31,13 +31,13 @@ class MT24LC256;
|
|||
driver code.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: SaveKey.hxx,v 1.3 2009-01-01 18:13:37 stephena Exp $
|
||||
@version $Id: SaveKey.hxx,v 1.4 2009-01-26 21:08:05 stephena Exp $
|
||||
*/
|
||||
class SaveKey : public Controller
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Create a new AtariVox controller plugged into the specified jack
|
||||
Create a new SaveKey controller plugged into the specified jack
|
||||
|
||||
@param jack The jack the controller is plugged into
|
||||
@param event The event object to use for events
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SerialPortUNIX.cxx,v 1.6 2009-01-01 18:13:39 stephena Exp $
|
||||
// $Id: SerialPortUNIX.cxx,v 1.7 2009-01-26 21:08:07 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -37,6 +37,7 @@ SerialPortUNIX::SerialPortUNIX()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SerialPortUNIX::~SerialPortUNIX()
|
||||
{
|
||||
closePort();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -62,7 +63,10 @@ bool SerialPortUNIX::openPort(const string& device)
|
|||
void SerialPortUNIX::closePort()
|
||||
{
|
||||
if(myHandle)
|
||||
{
|
||||
close(myHandle);
|
||||
myHandle = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: SerialPortWin32.cxx,v 1.5 2009-01-01 18:13:39 stephena Exp $
|
||||
// $Id: SerialPortWin32.cxx,v 1.6 2009-01-26 21:08:07 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <windows.h>
|
||||
|
@ -30,6 +30,7 @@ SerialPortWin32::SerialPortWin32()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SerialPortWin32::~SerialPortWin32()
|
||||
{
|
||||
closePort();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue