summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-11-10 03:33:56 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2011-11-10 03:33:56 (GMT)
commit4d3427f5b017c59a0fcd209cb615c31f60d8bc1e (patch)
treeaf881bc486097dc975bd64433b777d3c75a6477f
parent2ba1d01aeb6773a691136a896b59c25d14f38f28 (diff)
downloadabc8000-old-4d3427f5b017c59a0fcd209cb615c31f60d8bc1e.zip
abc8000-old-4d3427f5b017c59a0fcd209cb615c31f60d8bc1e.tar.gz
abc8000-old-4d3427f5b017c59a0fcd209cb615c31f60d8bc1e.tar.bz2
abc8000-old-4d3427f5b017c59a0fcd209cb615c31f60d8bc1e.tar.xz
sysstart: adjust test pattern to 640x480 mode
Change test pattern to match 640x480 pixels.
-rw-r--r--data/sysrom/sysstart.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/data/sysrom/sysstart.c b/data/sysrom/sysstart.c
index 6b8a3fa..6ff0f9f 100644
--- a/data/sysrom/sysstart.c
+++ b/data/sysrom/sysstart.c
@@ -190,7 +190,7 @@ static void irq_init(void)
cpu_set_spl(0);
}
-uint8_t __framebuf[2*400*640];
+uint8_t __framebuf[2*480*640];
static void picture(void)
{
@@ -200,13 +200,13 @@ static void picture(void)
ptr = __framebuf;
printf("Initializing frame buffer image @ %p\n", ptr);
- for (y = 0; y < 400; y++)
+ for (y = 0; y < 480; y++)
for (x = 0; x < 640; x++)
*ptr++ = x+y;
ptr = __framebuf;
printf("Reading back framebuffer image @ %p\n", ptr);
- for (y = 0; y < 400; y++) {
+ for (y = 0; y < 480; y++) {
for (x = 0; x < 640; x++) {
uint8_t z = x+y;
uint8_t v = *ptr;
@@ -218,19 +218,19 @@ static void picture(void)
}
printf("Drawing test frame picture at %p\n", ptr);
- writel(((size_t)__framebuf + 640*400) << 3, IO_VIDEO_ROW0START);
+ writel(((size_t)__framebuf + 640*480) << 3, IO_VIDEO_ROW0START);
memset((void *)ptr, 0, 256000); /* Clear picture 1 */
- for (i = 0; i < 100; i++) {
+ for (i = 0; i < 120; i++) {
unsigned int ofs = i*2;
unsigned int col = i+1;
aptr = &ptr[ofs*641];
- bptr = &ptr[(399*640)-ofs*639];
+ bptr = &ptr[(479*640)-ofs*639];
memset((void *)aptr, col, 640-2*ofs);
memset((void *)bptr, col, 640-2*ofs);
aptr = &ptr[ofs*641+640];
bptr = &ptr[639+ofs*639+640];
- for (y = ofs+1; y <= 398-ofs; y++) {
+ for (y = ofs+1; y <= 478-ofs; y++) {
*aptr = col; aptr += 640;
*bptr = col; bptr += 640;
}
@@ -239,7 +239,7 @@ static void picture(void)
printf("Soft-scrolling the picture...\n");
/* Soft-scroll the new picture in */
p = ((size_t)__framebuf) << 3;
- for (i = 0; i <= 400; i++) {
+ for (i = 0; i <= 480; i++) {
writel(p, IO_VIDEO_ROW0START);
p += (640 << 3);