ppi.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Fred Klaus                                      *
00003  *   frednet@web.de                                                        *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef PPI_H
00021 #define PPI_H
00022 
00023 #include "types.h"
00024 
00025 
00027 
00029 class Ppi
00030 {
00031 
00032 public:
00033         enum FlagB
00034         {
00035                 Triumph        = 2,      
00036                 Saisho         = 4 ,     
00037                 Solavox        = 6 ,     
00038                 Awa            = 8 ,     
00039                 Schneider      = 10 ,    
00040                 Orion          = 12 ,    
00041                 Amstrad        = 14,     
00042                 VSyncOccured   = 1,      
00043                 Refresh50Hz    = 16,     
00044                 Expansion      = 32,     
00045                 PrnterNotReady = 64,     
00046                 TapeRead       = 128     
00047         };
00048 
00049         Ppi();     
00050         ~Ppi() {}  
00051 
00052         void init();                                   
00053 
00054         UBYTE portA()   {return mPortA;}               
00055         UBYTE portB()   {return mPortB;}               
00056         UBYTE portC()   {return mPortC;}               
00057         UBYTE control() {return mControl;}             
00058         UBYTE jumpers() {return mJumpers;}             
00059 
00060         void setA(UBYTE val)       {mPortA=val;}       
00061         void setB(UBYTE val)       {mPortB=val;}       
00062         void setC(UBYTE val)       {mPortC=val;}       
00063         void setControl(UBYTE val) {mControl=val;}     
00064         void setJumpers(UBYTE val) {mJumpers=val;}     
00065 
00066         void addB(UBYTE flags)     {mPortB |= flags;}  
00067         void removeB(UBYTE flags)  {mPortB &= ~flags;} 
00068 
00069 private:
00070         UBYTE mPortA;
00071         UBYTE mPortB;
00072         UBYTE mPortC;
00073         UBYTE mControl;
00074 
00075         UBYTE mJumpers;
00076 };
00077 
00078 #endif //PPI_H

Generated on Fri Mar 16 21:30:28 2007 for roland.kdevelop by  doxygen 1.5.0