diff --git a/stella/src/emucore/AtariVox.cxx b/stella/src/emucore/AtariVox.cxx index 8f62ce1e9..fa0fcd764 100644 --- a/stella/src/emucore/AtariVox.cxx +++ b/stella/src/emucore/AtariVox.cxx @@ -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.9 2008-04-02 01:54:31 stephena Exp $ +// $Id: AtariVox.cxx,v 1.10 2008-04-09 17:19:15 stephena Exp $ //============================================================================ #ifdef SPEAKJET_EMULATION @@ -175,7 +175,7 @@ void AtariVox::shiftIn(bool value) #ifdef SPEAKJET_EMULATION mySpeakJet->write(data); #endif - mySerialPort->write(data); + mySerialPort->writeByte(data); } myShiftRegister = 0; } diff --git a/stella/src/emucore/SerialPort.hxx b/stella/src/emucore/SerialPort.hxx index 08c742c40..44c8483ff 100644 --- a/stella/src/emucore/SerialPort.hxx +++ b/stella/src/emucore/SerialPort.hxx @@ -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: SerialPort.hxx,v 1.1 2008-03-31 00:59:30 stephena Exp $ +// $Id: SerialPort.hxx,v 1.2 2008-04-09 17:19:15 stephena Exp $ //============================================================================ #ifndef SERIALPORT_HXX @@ -27,7 +27,7 @@ but it may be used for other devices in the future. @author Stephen Anthony - @version $Id: SerialPort.hxx,v 1.1 2008-03-31 00:59:30 stephena Exp $ + @version $Id: SerialPort.hxx,v 1.2 2008-04-09 17:19:15 stephena Exp $ */ class SerialPort { @@ -46,13 +46,13 @@ class SerialPort @return False on any errors, else true */ - virtual bool open(const string& device, int baud, int data, - int stop, int parity) { return false; } + virtual bool openPort(const string& device, int baud, int data, + int stop, int parity) { return false; } /** Close a previously opened serial port. */ - virtual void close() { } + virtual void closePort() { } /** Read a byte from the serial port. @@ -60,7 +60,7 @@ class SerialPort @param data Destination for the byte read from the port @return True if a byte was read, else false */ - virtual bool read(uInt8& data) { return false; } + virtual bool readByte(uInt8& data) { return false; } /** Write a byte to the serial port. @@ -68,7 +68,7 @@ class SerialPort @param data The byte to write to the port @return True if a byte was written, else false */ - virtual bool write(const uInt8 data) { return false; } + virtual bool writeByte(const uInt8 data) { return false; } }; #endif diff --git a/stella/src/unix/SerialPortUNIX.cxx b/stella/src/unix/SerialPortUNIX.cxx index 812d4e175..ffae7a037 100644 --- a/stella/src/unix/SerialPortUNIX.cxx +++ b/stella/src/unix/SerialPortUNIX.cxx @@ -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.1 2008-03-31 00:59:30 stephena Exp $ +// $Id: SerialPortUNIX.cxx,v 1.2 2008-04-09 17:19:15 stephena Exp $ //============================================================================ #include "SerialPortUNIX.hxx" @@ -30,26 +30,20 @@ SerialPortUNIX::~SerialPortUNIX() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool SerialPortUNIX::open(const string& device, int baud, int data, - int stop, int parity) +bool SerialPortUNIX::openPort(const string& device, int baud, int data, + int stop, int parity) { return false; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void SerialPortUNIX::close() +void SerialPortUNIX::closePort() { } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool SerialPortUNIX::read(uInt8& data) +bool SerialPortUNIX::writeByte(const uInt8 data) { - return false; -} - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool SerialPortUNIX::write(const uInt8 data) -{ - cerr << "SerialPortUNIX::write " << (int)data << endl; + cerr << "SerialPortUNIX::writeByte " << (int)data << endl; return false; } diff --git a/stella/src/unix/SerialPortUNIX.hxx b/stella/src/unix/SerialPortUNIX.hxx index acf1c4825..372d1d75b 100644 --- a/stella/src/unix/SerialPortUNIX.hxx +++ b/stella/src/unix/SerialPortUNIX.hxx @@ -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.hxx,v 1.1 2008-03-31 00:59:30 stephena Exp $ +// $Id: SerialPortUNIX.hxx,v 1.2 2008-04-09 17:19:16 stephena Exp $ //============================================================================ #ifndef SERIALPORT_UNIX_HXX @@ -22,10 +22,11 @@ #include "SerialPort.hxx" /** - Implement reading and writing from a serial port under UNIX. + Implement reading and writing from a serial port under UNIX. For now, + it seems to be Linux-only, and reading isn't actually supported at all. @author Stephen Anthony - @version $Id: SerialPortUNIX.hxx,v 1.1 2008-03-31 00:59:30 stephena Exp $ + @version $Id: SerialPortUNIX.hxx,v 1.2 2008-04-09 17:19:16 stephena Exp $ */ class SerialPortUNIX : public SerialPort { @@ -44,20 +45,12 @@ class SerialPortUNIX : public SerialPort @return False on any errors, else true */ - bool open(const string& device, int baud, int data, int stop, int parity); + bool openPort(const string& device, int baud, int data, int stop, int parity); /** Close a previously opened serial port. */ - void close(); - - /** - Read a byte from the serial port. - - @param data Destination for the byte read from the port - @return True if a byte was read, else false - */ - bool read(uInt8& data); + void closePort(); /** Write a byte to the serial port. @@ -65,7 +58,7 @@ class SerialPortUNIX : public SerialPort @param data The byte to write to the port @return True if a byte was written, else false */ - bool write(const uInt8 data); + bool writeByte(const uInt8 data); }; #endif