[Lapetus-cvs] lapetus rotscr.c,1.2,1.3
Status: Inactive
Brought to you by:
cyberwarriorx
From: Theo B. <cyb...@us...> - 2008-01-10 21:09:53
|
Update of /cvsroot/lapetus/lapetus In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18322 Modified Files: rotscr.c Log Message: -Added a few functions Index: rotscr.c =================================================================== RCS file: /cvsroot/lapetus/lapetus/rotscr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rotscr.c 4 Jul 2007 02:32:43 -0000 1.2 +++ rotscr.c 10 Jan 2008 21:09:50 -0000 1.3 @@ -23,6 +23,18 @@ ////////////////////////////////////////////////////////////////////////////// +void VdpSetRotationTable(screensettings_struct *settings, int num, rottbl_struct *tbl) +{ + volatile u16 *outtbl=(volatile u16 *)(0x20000000 | settings->parameteraddr | (num * 0x80)); + volatile u16 *intbl=(volatile u16 *)tbl; + int i; + + for (i = 0; i < sizeof(rottbl_struct) / 2; i++) + outtbl[i] = intbl[i]; +} + +////////////////////////////////////////////////////////////////////////////// + void InitRotationTable(u32 addr) { volatile rottbl_struct *tbl=(volatile rottbl_struct *)(0x20000000 | addr); @@ -271,6 +283,16 @@ ////////////////////////////////////////////////////////////////////////////// +void VdpRBG0DeInit(void) +{ + vdp2settings.BGON.part.rbg0enab = 0; + + // Disable Screen + VDP2_REG_BGON = vdp2settings.BGON.all; +} + +////////////////////////////////////////////////////////////////////////////// + int VdpRBG1Init(screensettings_struct *settings) { // First make sure RBG0 is enabled @@ -388,3 +410,13 @@ } ////////////////////////////////////////////////////////////////////////////// + +void VdpRBG1DeInit(void) +{ + vdp2settings.BGON.part.rbg1enab = 0; + + // Disable Screen + VDP2_REG_BGON = vdp2settings.BGON.all; +} + +////////////////////////////////////////////////////////////////////////////// |