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
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifdef SPEAKJET_EMULATION
|
||||||
|
@ -30,14 +30,14 @@ AtariVox::AtariVox(Jack jack, const Event& event, const System& system,
|
||||||
const SerialPort& port, const string& portname,
|
const SerialPort& port, const string& portname,
|
||||||
const string& eepromfile)
|
const string& eepromfile)
|
||||||
: Controller(jack, event, system, Controller::AtariVox),
|
: Controller(jack, event, system, Controller::AtariVox),
|
||||||
mySerialPort((SerialPort*)&port),
|
mySerialPort((SerialPort&)port),
|
||||||
myEEPROM(NULL),
|
myEEPROM(NULL),
|
||||||
myShiftCount(0),
|
myShiftCount(0),
|
||||||
myShiftRegister(0),
|
myShiftRegister(0),
|
||||||
myLastDataWriteCycle(0)
|
myLastDataWriteCycle(0)
|
||||||
{
|
{
|
||||||
#ifndef SPEAKJET_EMULATION
|
#ifndef SPEAKJET_EMULATION
|
||||||
if(mySerialPort->openPort(portname))
|
if(mySerialPort.openPort(portname))
|
||||||
myAboutString = " (using serial port \'" + portname + "\')";
|
myAboutString = " (using serial port \'" + portname + "\')";
|
||||||
else
|
else
|
||||||
myAboutString = " (invalid serial port \'" + portname + "\')";
|
myAboutString = " (invalid serial port \'" + portname + "\')";
|
||||||
|
@ -58,7 +58,7 @@ AtariVox::AtariVox(Jack jack, const Event& event, const System& system,
|
||||||
AtariVox::~AtariVox()
|
AtariVox::~AtariVox()
|
||||||
{
|
{
|
||||||
#ifndef SPEAKJET_EMULATION
|
#ifndef SPEAKJET_EMULATION
|
||||||
mySerialPort->closePort();
|
mySerialPort.closePort();
|
||||||
#else
|
#else
|
||||||
delete mySpeakJet;
|
delete mySpeakJet;
|
||||||
#endif
|
#endif
|
||||||
|
@ -159,7 +159,7 @@ void AtariVox::clockDataIn(bool value)
|
||||||
{
|
{
|
||||||
uInt8 data = ((myShiftRegister >> 1) & 0xff);
|
uInt8 data = ((myShiftRegister >> 1) & 0xff);
|
||||||
#ifndef SPEAKJET_EMULATION
|
#ifndef SPEAKJET_EMULATION
|
||||||
mySerialPort->writeByte(&data);
|
mySerialPort.writeByte(&data);
|
||||||
#else
|
#else
|
||||||
mySpeakJet->write(data);
|
mySpeakJet->write(data);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef ATARIVOX_HXX
|
||||||
|
@ -33,7 +33,7 @@ class MT24LC256;
|
||||||
driver code.
|
driver code.
|
||||||
|
|
||||||
@author B. Watson
|
@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
|
class AtariVox : public Controller
|
||||||
{
|
{
|
||||||
|
@ -100,15 +100,10 @@ class AtariVox : public Controller
|
||||||
void shiftIn(bool value);
|
void shiftIn(bool value);
|
||||||
|
|
||||||
private:
|
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
|
// Instance of an real serial port on the system
|
||||||
// Assuming there's a real AtariVox attached, we can send SpeakJet
|
// Assuming there's a real AtariVox attached, we can send SpeakJet
|
||||||
// bytes directly to it
|
// bytes directly to it
|
||||||
SerialPort* mySerialPort;
|
SerialPort& mySerialPort;
|
||||||
|
|
||||||
// The EEPROM used in the AtariVox
|
// The EEPROM used in the AtariVox
|
||||||
MT24LC256* myEEPROM;
|
MT24LC256* myEEPROM;
|
||||||
|
|
|
@ -13,18 +13,20 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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 "Console.hxx"
|
||||||
#include "M6532.hxx"
|
|
||||||
#include "Random.hxx"
|
#include "Random.hxx"
|
||||||
#include "Switches.hxx"
|
#include "Switches.hxx"
|
||||||
#include "System.hxx"
|
#include "System.hxx"
|
||||||
#include "Serializer.hxx"
|
#include "Serializer.hxx"
|
||||||
#include "Deserializer.hxx"
|
#include "Deserializer.hxx"
|
||||||
#include <iostream>
|
|
||||||
|
#include "M6532.hxx"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
M6532::M6532(const Console& console)
|
M6532::M6532(const Console& console)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef MT24LC256_HXX
|
||||||
|
@ -30,7 +30,7 @@ class System;
|
||||||
(aka Supercat) for the bulk of this code.
|
(aka Supercat) for the bulk of this code.
|
||||||
|
|
||||||
@author Stephen Anthony & J. Payson
|
@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
|
class MT24LC256
|
||||||
{
|
{
|
||||||
|
@ -116,5 +116,5 @@ class MT24LC256
|
||||||
// Assignment operator isn't supported by this class so make it private
|
// Assignment operator isn't supported by this class so make it private
|
||||||
MT24LC256& operator = (const MT24LC256&);
|
MT24LC256& operator = (const MT24LC256&);
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef SAVEKEY_HXX
|
||||||
|
@ -31,13 +31,13 @@ class MT24LC256;
|
||||||
driver code.
|
driver code.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@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
|
class SaveKey : public Controller
|
||||||
{
|
{
|
||||||
public:
|
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 jack The jack the controller is plugged into
|
||||||
@param event The event object to use for events
|
@param event The event object to use for events
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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>
|
#include <sys/types.h>
|
||||||
|
@ -37,6 +37,7 @@ SerialPortUNIX::SerialPortUNIX()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
SerialPortUNIX::~SerialPortUNIX()
|
SerialPortUNIX::~SerialPortUNIX()
|
||||||
{
|
{
|
||||||
|
closePort();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -62,7 +63,10 @@ bool SerialPortUNIX::openPort(const string& device)
|
||||||
void SerialPortUNIX::closePort()
|
void SerialPortUNIX::closePort()
|
||||||
{
|
{
|
||||||
if(myHandle)
|
if(myHandle)
|
||||||
|
{
|
||||||
close(myHandle);
|
close(myHandle);
|
||||||
|
myHandle = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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>
|
#include <windows.h>
|
||||||
|
@ -30,6 +30,7 @@ SerialPortWin32::SerialPortWin32()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
SerialPortWin32::~SerialPortWin32()
|
SerialPortWin32::~SerialPortWin32()
|
||||||
{
|
{
|
||||||
|
closePort();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
Loading…
Reference in New Issue