// $Id: Rw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
// $Id: Rw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
//
|
//
|
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
//
|
//
|
// This program is free software; you may redistribute and/or modify it under
|
// This program is free software; you may redistribute and/or modify it under
|
// the terms of the GNU General Public License as published by the Free
|
// the terms of the GNU General Public License as published by the Free
|
// Software Foundation, either version 2, or at your option any later version.
|
// Software Foundation, either version 2, or at your option any later version.
|
//
|
//
|
// This program is distributed in the hope that it will be useful, but
|
// This program is distributed in the hope that it will be useful, but
|
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
// for complete details.
|
// for complete details.
|
//
|
//
|
// Revision History:
|
// Revision History:
|
// Date Rev Version Comment
|
// Date Rev Version Comment
|
// 2013-05-03 515 1.0 Initial version
|
// 2013-05-03 515 1.0 Initial version
|
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
|
|
|
|
/*!
|
/*!
|
\file
|
\file
|
\version $Id: Rw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
\version $Id: Rw11CntlPC11.hpp 515 2013-05-04 17:28:59Z mueller $
|
\brief Declaration of class Rw11CntlPC11.
|
\brief Declaration of class Rw11CntlPC11.
|
*/
|
*/
|
|
|
#ifndef included_Retro_Rw11CntlPC11
|
#ifndef included_Retro_Rw11CntlPC11
|
#define included_Retro_Rw11CntlPC11 1
|
#define included_Retro_Rw11CntlPC11 1
|
|
|
#include "Rw11CntlBase.hpp"
|
#include "Rw11CntlBase.hpp"
|
#include "Rw11UnitPC11.hpp"
|
#include "Rw11UnitPC11.hpp"
|
|
|
namespace Retro {
|
namespace Retro {
|
|
|
class Rw11CntlPC11 : public Rw11CntlBase<Rw11UnitPC11,2> {
|
class Rw11CntlPC11 : public Rw11CntlBase<Rw11UnitPC11,2> {
|
public:
|
public:
|
|
|
Rw11CntlPC11();
|
Rw11CntlPC11();
|
~Rw11CntlPC11();
|
~Rw11CntlPC11();
|
|
|
void Config(const std::string& name, uint16_t base, int lam);
|
void Config(const std::string& name, uint16_t base, int lam);
|
|
|
virtual void Start();
|
virtual void Start();
|
|
|
virtual bool BootCode(size_t unit, std::vector<uint16_t>& code,
|
virtual bool BootCode(size_t unit, std::vector<uint16_t>& code,
|
uint16_t& aload, uint16_t& astart);
|
uint16_t& aload, uint16_t& astart);
|
|
|
virtual void UnitSetup(size_t ind);
|
virtual void UnitSetup(size_t ind);
|
|
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const;
|
virtual void Dump(std::ostream& os, int ind=0, const char* text=0) const;
|
|
|
// some constants (also defined in cpp)
|
// some constants (also defined in cpp)
|
static const uint16_t kIbaddr = 0177550; //!< PC11 default address
|
static const uint16_t kIbaddr = 0177550; //!< PC11 default address
|
static const int kLam = 10; //!< PC11 default lam
|
static const int kLam = 10; //!< PC11 default lam
|
|
|
static const uint16_t kRCSR = 000; //!< RCSR register address offset
|
static const uint16_t kRCSR = 000; //!< RCSR register address offset
|
static const uint16_t kRBUF = 002; //!< RBUF register address offset
|
static const uint16_t kRBUF = 002; //!< RBUF register address offset
|
static const uint16_t kPCSR = 004; //!< PCSR register address offset
|
static const uint16_t kPCSR = 004; //!< PCSR register address offset
|
static const uint16_t kPBUF = 006; //!< PBUF register address offset
|
static const uint16_t kPBUF = 006; //!< PBUF register address offset
|
|
|
static const uint16_t kUnit_PR = 0; //<! unit number of paper reader
|
static const uint16_t kUnit_PR = 0; //<! unit number of paper reader
|
static const uint16_t kUnit_PP = 1; //<! unit number of paper puncher
|
static const uint16_t kUnit_PP = 1; //<! unit number of paper puncher
|
|
|
static const uint16_t kProbeOff = kRCSR; //!< probe address offset (rcsr)
|
static const uint16_t kProbeOff = kRCSR; //!< probe address offset (rcsr)
|
static const bool kProbeInt = true; //!< probe int active
|
static const bool kProbeInt = true; //!< probe int active
|
static const bool kProbeRem = true; //!< probr rem active
|
static const bool kProbeRem = true; //!< probr rem active
|
|
|
static const uint16_t kRCSR_M_ERROR = kWBit15;
|
static const uint16_t kRCSR_M_ERROR = kWBit15;
|
static const uint16_t kPCSR_M_ERROR = kWBit15;
|
static const uint16_t kPCSR_M_ERROR = kWBit15;
|
static const uint16_t kPBUF_M_RBUSY = kWBit09;
|
static const uint16_t kPBUF_M_RBUSY = kWBit09;
|
static const uint16_t kPBUF_M_PVAL = kWBit08;
|
static const uint16_t kPBUF_M_PVAL = kWBit08;
|
static const uint16_t kPBUF_M_BUF = 0377;
|
static const uint16_t kPBUF_M_BUF = 0377;
|
|
|
protected:
|
protected:
|
int AttnHandler(const RlinkServer::AttnArgs& args);
|
int AttnHandler(const RlinkServer::AttnArgs& args);
|
void SetOnline(size_t ind, bool online);
|
void SetOnline(size_t ind, bool online);
|
|
|
protected:
|
protected:
|
size_t fPC_pbuf; //!< PrimClist: pbuf index
|
size_t fPC_pbuf; //!< PrimClist: pbuf index
|
};
|
};
|
|
|
} // end namespace Retro
|
} // end namespace Retro
|
|
|
//#include "Rw11CntlPC11.ipp"
|
//#include "Rw11CntlPC11.ipp"
|
|
|
#endif
|
#endif
|
|
|