gatearray.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 GATEARRAY_H
00021 #define GATEARRAY_H
00022 
00023 #include "types.h"
00024 
00026 
00028 class GateArray
00029 {
00030 
00031 public:
00032         GateArray()  {init();}
00033         ~GateArray() {}           
00034 
00035         void init();
00036 
00037         UBYTE  pen()              {return mPen;}
00038         UBYTE* ink()              {return mInk;}
00039         UBYTE  ink(UBYTE num)     {return mInk[num];}
00040         UDWORD palette(UBYTE num) {return mPalette[num];}
00041 
00042         UBYTE romConfig()         {return mRomConfig;}
00043         UBYTE ramConfig()         {return mRamConfig;}
00044         UBYTE ramBank()           {return mRamBank;}
00045         UBYTE upperRom()          {return mUpperRom;}
00046         UBYTE counter()           {return mCounter;}
00047         UBYTE mode()              {return mMode;}
00048         UBYTE requestedMode()     {return mRequestedMode;}
00049         bool  interrupt()         {return mInterrupt;}
00050         UBYTE intDelay()          {return mIntDelay;}
00051         UBYTE slCount()           {return mSlCount;}
00052 
00053         void setPen(UBYTE pen)               {mPen = pen;}
00054         //void setInk(UBYTE* ink) {for (int i=0; i<17; i++) mInk[i] = ink[i];}
00055         void setInk(UBYTE ink)               {mInk[mPen] = ink;}
00056         void setInk(UBYTE num, UBYTE ink)    {mInk[num]  = ink;}
00057 
00058         void setPalette(UBYTE num, uint col) {mPalette[num]  = col;}
00059         void setPalette(uint col)            {mPalette[mPen] = col;}
00060 
00061         void setRomConfig(UBYTE romcfg)      {mRomConfig = romcfg;}
00062         void setRamConfig(UBYTE ramcfg)      {mRamConfig = ramcfg;}
00063         void setRamBank  (UBYTE ramcfg)      {mRamBank   = ramcfg;}
00064         void setUpperRom (UBYTE ramcfg)      {mUpperRom  = ramcfg;}
00065 
00066         void setMode(UBYTE mode)             {mMode = mode;}
00067         void setRequestedMode(UBYTE mode)    {mRequestedMode = mode;}
00068 
00069         void setInterrupt(bool enabled)      {mInterrupt = enabled;}
00070         void setIntDelay (UBYTE value)       {mIntDelay  = value;}
00071         void setSlCount  (UBYTE value)       {mSlCount   = value;}
00072 
00073 private:
00074         UBYTE mRomConfig;
00075         UBYTE mRamConfig;
00076         UBYTE mRamBank;
00077         UBYTE mUpperRom;
00078         UBYTE mCounter;
00079         UBYTE mMode;
00080         UBYTE mRequestedMode;
00081         UBYTE mSlCount;
00082         
00083         UBYTE   mPen;
00084         UBYTE   mInk[17];
00085         UDWORD  mPalette[17];
00086 
00087         bool  mInterrupt;
00088         UBYTE mIntDelay;
00089 
00090 };
00091 
00092 #endif

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