Some more Testsuite programs. The Time one is interesting because it shows that the time is off by around 3 minutes, Modified the sconstruct to remove the flag for stackrealign since it kills GCC 4.3.2

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1647 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1
2008-12-24 09:46:50 +00:00
parent fd60a51a95
commit 4486e3a49c
15 changed files with 554 additions and 132 deletions

View File

@ -0,0 +1,55 @@
#include <gccore.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <ogcsys.h>
#include <time.h>
#include <sys/time.h>
#include <iostream>
#include <debug.h>
#include <math.h>
static void *xfb = NULL;
u32 first_frame = 1;
GXRModeObj *rmode;
int main() {
VIDEO_Init();
rmode = VIDEO_GetPreferredMode(NULL);
xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
VIDEO_Configure(rmode);
VIDEO_SetNextFramebuffer(xfb);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*2);
time_t gc_time;
gc_time = time(NULL);
srand(gc_time);
while(1) {
gc_time = time(NULL);
printf("\x1b[10;0HRTC time is %s ",ctime(&gc_time));
VIDEO_WaitVSync();
}
}