aboutsummaryrefslogtreecommitdiff
path: root/01-ctest/main.c
diff options
context:
space:
mode:
authorTakamichi Horikawa <myon@myon98.net>2021-12-04 13:41:35 +0900
committerTakamichi Horikawa <myon@myon98.net>2021-12-04 13:41:35 +0900
commit74fe5e24beb14b00ce3d69e5a3010c520d4bf8e5 (patch)
tree7977c7d2df8f02bdea1a2fc0dd50df000eb044e6 /01-ctest/main.c
Initial: vram write test
Diffstat (limited to '01-ctest/main.c')
-rw-r--r--01-ctest/main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/01-ctest/main.c b/01-ctest/main.c
new file mode 100644
index 0000000..fb7ec73
--- /dev/null
+++ b/01-ctest/main.c
@@ -0,0 +1,18 @@
+#include <stdint.h>
+
+enum {
+ DISPH = 480,
+ DISPW = 800,
+};
+
+void cstart(void)
+{
+ uint16_t * const dptr = (uint16_t *)0x14800000;
+
+ for (int y = 0; y < DISPH; y++) {
+ for (int x = 0; x < DISPW; x++) {
+ dptr[y*DISPW+x] = ((x&1)^(y&1)) ? 0 : 0xffff;
+ }
+ }
+}
+