Update of /cvsroot/lapetus/lapetus
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv668
Modified Files:
scrscr.c
Log Message:
-Added DeInit functions
Index: scrscr.c
===================================================================
RCS file: /cvsroot/lapetus/lapetus/scrscr.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- scrscr.c 27 Feb 2007 23:30:32 -0000 1.1
+++ scrscr.c 3 Jun 2009 01:46:24 -0000 1.2
@@ -61,22 +61,30 @@
int SetupRamCycles()
{
- int cycles=0;
+ int cycles[4]= { 0, 0, 0, 0 };
int availcycles;
+ char zmtbl[4] = { 1, 2, 4, 4}; // 1, 1/2, 1/4, 1/4
+ char coltbl[8] = { 1, 2, 4, 4, 8, 0, 0, 0 }; // 16 color, 256 color, 2048 color, 32768 color, 16.7M color
// Figure out how many available cycles we have
availcycles = 16;
- if (VDP2_REG_RAMCTL & 0x100)
- availcycles += 8;
- if (VDP2_REG_RAMCTL & 0x200)
- availcycles += 8;
+
+// if (VDP2_REG_RAMCTL & 0x100)
+// availcycles += 8;
+// if (VDP2_REG_RAMCTL & 0x200)
+// availcycles += 8;
// Let's first make sure we have enough cycles for everything
if (vdp2settings.BGON.part.nbg0enab)
{
-// CalcColorCycles(vdp2settings.CHCTLA.part.n0chcn);
+ // color settings
+// cycles += coltbl[(vdp2settings.CHCTLA.part.n0chcn >> 4) & 0x7];
+
+ // Is zoom being used?
+// cycles = cycles * zmtbl[vdp2settings.ZMCTL.part.n0zm];
// Is it tiled or bitmap?
+
// which bank is being used?
// (for tile)
@@ -201,6 +209,16 @@
//////////////////////////////////////////////////////////////////////////////
+void VdpNBG0DeInit(void)
+{
+ vdp2settings.BGON.part.nbg0enab = 0;
+
+ // Disable Screen
+ VDP2_REG_BGON = vdp2settings.BGON.all;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
int VdpNBG1Init(screensettings_struct *settings)
{
// First make sure we're not not going to run into any
@@ -295,6 +313,16 @@
//////////////////////////////////////////////////////////////////////////////
+void VdpNBG1DeInit(void)
+{
+ vdp2settings.BGON.part.nbg1enab = 0;
+
+ // Disable Screen
+ VDP2_REG_BGON = vdp2settings.BGON.all;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
int VdpNBG2Init(screensettings_struct *settings)
{
vdp2settings.BGON.part.nbg2enab = 1;
@@ -361,6 +389,16 @@
//////////////////////////////////////////////////////////////////////////////
+void VdpNBG2DeInit(void)
+{
+ vdp2settings.BGON.part.nbg2enab = 0;
+
+ // Disable Screen
+ VDP2_REG_BGON = vdp2settings.BGON.all;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
int VdpNBG3Init(screensettings_struct *settings)
{
vdp2settings.BGON.part.nbg3enab = 1;
@@ -427,6 +465,16 @@
//////////////////////////////////////////////////////////////////////////////
+void VdpNBG3DeInit(void)
+{
+ vdp2settings.BGON.part.nbg3enab = 0;
+
+ // Disable Screen
+ VDP2_REG_BGON = vdp2settings.BGON.all;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
int VdpEXBGInit(screensettings_struct *settings)
{
return VDP_ERR_OK;
@@ -434,3 +482,8 @@
//////////////////////////////////////////////////////////////////////////////
+void VdpEXBGDeInit(void)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
|