From 74fe5e24beb14b00ce3d69e5a3010c520d4bf8e5 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Sat, 4 Dec 2021 13:41:35 +0900 Subject: Initial: vram write test --- 01-ctest/main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 01-ctest/main.c (limited to '01-ctest/main.c') 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 + +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; + } + } +} + -- cgit v1.2.3