G3D_LIGHT1 = 0x000010,
G3D_LIGHT2 = 0x000020,
G3D_LIGHT3 = 0x000040,
- G3D_TEXTURE_2D = 0x000080, /* XXX doesn't affect anything, use g3d_polygon_mode */
+ G3D_TEXTURE_2D = 0x000080,
G3D_BLEND = 0x000100,
G3D_TEXTURE_GEN = 0x000200,
G3D_CLIP_FRUSTUM = 0x000800,/* when disabled, don't clip against the frustum */
float a[2], b[2], dt;
float anim, alpha, center_alpha;
- memset(fb_pixels, 0, fb_width * fb_height * 4);
+ memset(fb_pixels, 0x11, fb_width * fb_height * 4);
anim = fmod(t / 6.0f, LOOPTIME);
alpha = 1.0f - ((anim - (LOOPTIME - 0.075)) / 0.06f);
#define CON_TEXTMODE
#define CON_SERIAL
+#define MOVE_STACK_RAMTOP
+/* allocate 64k for stack */
+#define STACK_PAGES 16
+
+
#endif /* PCBOOT_CONFIG_H_ */
#include <stdio.h>
#include <string.h>
#include <ctype.h>
+#include <unistd.h>
#include "segm.h"
#include "intr.h"
#include "mem.h"
qsort(vmodes, nmodes, sizeof *vmodes, modecmp);
for(i=0; i<nmodes; i++) {
+ printf("trying video mode: %x (%dx%d %dbpp)\n", vmodes[i].mode, vmodes[i].width,
+ vmodes[i].height, vmodes[i].bpp);
+ usleep(5000000);
if((fbptr = set_video_mode(vmodes[i].mode))) {
vmode = vmodes[i];
- printf("video mode: %x (%dx%d %dbpp)\n", vmode.mode, vmode.width,
- vmode.height, vmode.bpp);
break;
}
}
#include <errno.h>
#include "unistd.h"
#include "fs.h"
+#include "timer.h"
+#include "asmops.h"
int chdir(const char *path)
{
fs_close(fsn);
return 0;
}
+
+int usleep(unsigned long usec)
+{
+ unsigned long wait_ticks = MSEC_TO_TICKS(usec / 1000ul);
+ unsigned long start_ticks = nticks;
+ while(nticks - start_ticks < wait_ticks) {
+ halt_cpu();
+ }
+ return 0;
+}
int mkdir(const char *path, int mode);
int rmdir(const char *path);
+int usleep(unsigned long usec);
+
#endif /* UNISTD_H_ */