projects
/
bootcensus
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
19e033a
)
foo
author
John Tsiombikas
<nuclear@member.fsf.org>
Tue, 3 Sep 2019 19:55:23 +0000
(22:55 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Tue, 3 Sep 2019 19:55:23 +0000
(22:55 +0300)
src/census/3dgfx.h
patch
|
blob
|
history
src/census/census.c
patch
|
blob
|
history
src/config.h
patch
|
blob
|
history
src/kmain.c
patch
|
blob
|
history
src/libc/unistd.c
patch
|
blob
|
history
src/libc/unistd.h
patch
|
blob
|
history
diff --git
a/src/census/3dgfx.h
b/src/census/3dgfx.h
index
89b28d8
..
0ae58c9
100644
(file)
--- a/
src/census/3dgfx.h
+++ b/
src/census/3dgfx.h
@@
-26,7
+26,7
@@
enum {
G3D_LIGHT1 = 0x000010,
G3D_LIGHT2 = 0x000020,
G3D_LIGHT3 = 0x000040,
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 */
G3D_BLEND = 0x000100,
G3D_TEXTURE_GEN = 0x000200,
G3D_CLIP_FRUSTUM = 0x000800,/* when disabled, don't clip against the frustum */
diff --git
a/src/census/census.c
b/src/census/census.c
index
724ab2a
..
7eea8d3
100644
(file)
--- a/
src/census/census.c
+++ b/
src/census/census.c
@@
-45,7
+45,7
@@
void draw_census(void)
float a[2], b[2], dt;
float anim, alpha, center_alpha;
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);
anim = fmod(t / 6.0f, LOOPTIME);
alpha = 1.0f - ((anim - (LOOPTIME - 0.075)) / 0.06f);
diff --git
a/src/config.h
b/src/config.h
index
58a6147
..
f444b95
100644
(file)
--- a/
src/config.h
+++ b/
src/config.h
@@
-24,4
+24,9
@@
along with this program. If not, see <https://www.gnu.org/licenses/>.
#define CON_TEXTMODE
#define CON_SERIAL
#define CON_TEXTMODE
#define CON_SERIAL
+#define MOVE_STACK_RAMTOP
+/* allocate 64k for stack */
+#define STACK_PAGES 16
+
+
#endif /* PCBOOT_CONFIG_H_ */
#endif /* PCBOOT_CONFIG_H_ */
diff --git
a/src/kmain.c
b/src/kmain.c
index
99104a2
..
bcd8a91
100644
(file)
--- a/
src/kmain.c
+++ b/
src/kmain.c
@@
-18,6
+18,7
@@
along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
+#include <unistd.h>
#include "segm.h"
#include "intr.h"
#include "mem.h"
#include "segm.h"
#include "intr.h"
#include "mem.h"
@@
-119,10
+120,11
@@
static int video_init(void)
qsort(vmodes, nmodes, sizeof *vmodes, modecmp);
for(i=0; i<nmodes; i++) {
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];
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;
}
}
break;
}
}
diff --git
a/src/libc/unistd.c
b/src/libc/unistd.c
index
1fc0542
..
7da132f
100644
(file)
--- a/
src/libc/unistd.c
+++ b/
src/libc/unistd.c
@@
-19,6
+19,8
@@
along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <errno.h>
#include "unistd.h"
#include "fs.h"
#include <errno.h>
#include "unistd.h"
#include "fs.h"
+#include "timer.h"
+#include "asmops.h"
int chdir(const char *path)
{
int chdir(const char *path)
{
@@
-59,3
+61,13
@@
int rmdir(const char *path)
fs_close(fsn);
return 0;
}
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;
+}
diff --git
a/src/libc/unistd.h
b/src/libc/unistd.h
index
1ed4cf2
..
63651c3
100644
(file)
--- a/
src/libc/unistd.h
+++ b/
src/libc/unistd.h
@@
-24,4
+24,6
@@
char *getcwd(char *buf, int sz);
int mkdir(const char *path, int mode);
int rmdir(const char *path);
int mkdir(const char *path, int mode);
int rmdir(const char *path);
+int usleep(unsigned long usec);
+
#endif /* UNISTD_H_ */
#endif /* UNISTD_H_ */