Update of /cvsroot/lapetus/lapetus/tests/regtest
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv474
Added Files:
main.c
Log Message:
-Slowly but steadily commiting my regression testing code for emulators
--- NEW FILE: main.c ---
/* Copyright 2006-2007 Theo Berkau
This file is part of Lapetus.
Lapetus is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Lapetus is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Lapetus; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <lapetus.h>
#include "cdb.h"
#include "scsp.h"
#include "scu.h"
#include "sh2.h"
#include "vdp2.h"
#include "intfac.h"
MENUITEMSTRUCT mainmenu[] = {
{ "SH2 Test" , &sh2test, },
{ "SCU Test", &scutest, },
{ "CD Block Test" , &cdbtest, },
//{ "68k Test" , &cdbtest, },
{ "SCSP Test" , &scsptest, },
//{ "VDP1 Test" , &vdp1test, },
{ "VDP2 Test" , &vdp2test, },
{ "\0", NULL }
};
screensettings_struct testdispsettings;
font_struct testdispfont;
//////////////////////////////////////////////////////////////////////////////
int main()
{
int i;
int choice;
BIOS_ChangeSCUInterruptMask(0xFFFFFFFF, 0xFFFFFFFF);
InterruptSetLevelMask(0);
// Wait a bit
for (i = 0; i < 200000; i++) {}
InterruptSetLevelMask(0xF);
BIOS_SetSCUInterrupt(0x40, 0);
BIOS_SetSCUInterrupt(0x41, 0);
BIOS_SetSCUInterrupt(0x42, 0);
BIOS_SetSCUInterrupt(0x43, 0);
BIOS_SetSCUInterrupt(0x44, 0);
BIOS_SetSCUInterrupt(0x45, 0);
BIOS_SetSCUInterrupt(0x46, 0);
BIOS_SetSCUInterrupt(0x47, 0);
BIOS_SetSCUInterrupt(0x48, 0);
BIOS_SetSCUInterrupt(0x49, 0);
BIOS_SetSCUInterrupt(0x4A, 0);
BIOS_SetSCUInterrupt(0x4B, 0);
BIOS_SetSCUInterrupt(0x4C, 0);
BIOS_SetSCUInterrupt(0x4D, 0);
BIOS_SetSCUInterrupt(0x50, 0);
InitLapetus(RES_320x224);
// Setup a screen for us draw on
testdispsettings.isbitmap = TRUE;
testdispsettings.bitmapsize = BG_BITMAP512x256;
testdispsettings.transparentbit = 0;
testdispsettings.color = BG_256COLOR;
testdispsettings.specialpriority = 0;
testdispsettings.specialcolorcalc = 0;
testdispsettings.extrapalettenum = 0;
testdispsettings.mapoffset = 0;
testdispsettings.rotationmode = 0;
testdispsettings.parameteraddr = 0x25E60000;
VdpRBG0Init(&testdispsettings);
// Use the default palette
VdpSetDefaultPalette();
// Setup an 8x8 1BPP font
testdispfont.data = font8x8;
testdispfont.width = 8;
testdispfont.height = 8;
testdispfont.bpp = 1;
testdispfont.out = (u8 *)0x25E00000;
VdpSetFont(SCREEN_RBG0, &testdispfont);
// Print messages and cursor
VdpPrintf(&testdispfont, 2 * 8, 1 * 8, 15, "Saturn Regression Test v0.2");
VdpDispOn();
// Display Main Menu
for(;;)
{
choice = DoMenu(mainmenu, 4, 14);
slClear();
}
}
//////////////////////////////////////////////////////////////////////////////
|