summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt4
-rw-r--r--ax/GNUmakefile1
-rw-r--r--ax/source/gfx/rec.cc28
-rw-r--r--demo/include/ax-demo.h12
-rw-r--r--demo/source/chkkeys.c23
-rw-r--r--demo/source/loop.c3
-rw-r--r--demo/source/start.c60
7 files changed, 90 insertions, 41 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a887360..57ddfee 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,7 @@
+# A.3
+
+* Implement rec (excluding hrec);
+
# A.2
* Fix init not exchanging instruction set when start is implemented with ARM instructions;
diff --git a/ax/GNUmakefile b/ax/GNUmakefile
index 054fcaa..d5a07ba 100644
--- a/ax/GNUmakefile
+++ b/ax/GNUmakefile
@@ -74,6 +74,7 @@ OBJS := \
source/gfx/plot.o \
source/gfx/plottex.o \
source/gfx/rd.o \
+ source/gfx/rec.o \
source/gfx/setcol.o \
source/gfx/vsync.o \
source/key/getkeymap.o \
diff --git a/ax/source/gfx/rec.cc b/ax/source/gfx/rec.cc
new file mode 100644
index 0000000..afc5fd4
--- /dev/null
+++ b/ax/source/gfx/rec.cc
@@ -0,0 +1,28 @@
+/*
+ Copyright 2022 Gabriel Jensen.
+ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+ If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>.
+*/
+
+#include <ax/priv.h>
+
+#include <ax/gfx.h>
+
+template<typename _pxtyp> [[gnu::always_inline]] inline static auto __ax_rec(::ax_i02 const _vaddr,::ax_i8 const _scrnw,::ax_i01 const _px,::ax_i8 const _w,::ax_i8 const _h,_pxtyp const _col) noexcept -> void {
+ static_assert(::__ax_typeq<_pxtyp,::ax_i8> || ::__ax_typeq<_pxtyp,::ax_i01>);
+ for (::ax_i01 px = _px;px != _px + _h * _scrnw;) {
+ ::ax_i01 const rowstart = px;
+ for (;px != rowstart + _w;++px) {
+ if constexpr (::__ax_typeq<_pxtyp,::ax_i01>) {
+ __ax_plot2(_vaddr,px,_col);
+ }
+ else {
+ ax_plot1(_vaddr,px,_col);
+ }
+ }
+ px = rowstart + _scrnw;
+ }
+}
+
+extern "C" auto ax_rec1(::ax_i02 const _vaddr,::ax_i8 const _scrnw,::ax_i01 const _px,::ax_i8 const _w,::ax_i8 const _h,::ax_i8 const _col) -> void {::__ax_rec(_vaddr,_scrnw,_px,_w,_h,_col);}
+extern "C" auto ax_rec2(::ax_i02 const _vaddr,::ax_i8 const _scrnw,::ax_i01 const _px,::ax_i8 const _w,::ax_i8 const _h,::ax_i01 const _col) -> void {::__ax_rec(_vaddr,_scrnw,_px,_w,_h,_col);}
diff --git a/demo/include/ax-demo.h b/demo/include/ax-demo.h
index 6b354c6..0d95c14 100644
--- a/demo/include/ax-demo.h
+++ b/demo/include/ax-demo.h
@@ -1,7 +1,7 @@
#if !defined(axd_hdr)
#define axd_hdr
-#include <ax/bs.h>
+#include <ax/key.h>
typedef struct {
ax_i8 x;
@@ -17,10 +17,12 @@ typedef struct {
} axd_dat;
typedef struct {
- bool done;
- bool err;
- bool drw;
- bool mv;
+ bool done;
+ bool err;
+ ax_key key;
+ bool keydwn;
+ bool drw;
+ bool mv;
} axd_upd;
axd_upd axd_chkkeys( axd_dat * dat);
diff --git a/demo/source/chkkeys.c b/demo/source/chkkeys.c
index 262d542..2de80bd 100644
--- a/demo/source/chkkeys.c
+++ b/demo/source/chkkeys.c
@@ -4,16 +4,14 @@
#include <ax/gfx.h>
#define axd_chk(_key) \
- curkey = _key; \
- if (ax_chkkey(keymap,_key))
-
-#define axd_wait() \
- while (ax_chkkey(ax_getkeymap(),curkey)) {}
+ if ((upd.keydwn = ax_chkkey(keymap,(upd.key = _key))))
axd_upd axd_chkkeys(axd_dat * _dat) {
axd_upd upd = {};
ax_keymap const keymap = ax_getkeymap();
- ax_key curkey;
+ if (ax_chkkey(keymap,ax_key_a)) {
+ upd.drw = true;
+ }
axd_chk(ax_key_sel) {
upd.done = true;
upd.err = true;
@@ -25,40 +23,39 @@ axd_upd axd_chkkeys(axd_dat * _dat) {
}
axd_chk(ax_key_l) {
axd_chgcol(_dat,0x0u);
- axd_wait()
+ return upd;
}
axd_chk(ax_key_r) {
axd_chgcol(_dat,0x1u);
- axd_wait()
+ return upd;
}
axd_chk(ax_key_pade) {
if (_dat->pos.x != 0xEEu) {
upd.mv = true;
++_dat->pos.x;
- axd_wait()
+ return upd;
}
}
axd_chk(ax_key_padn) {
if (_dat->pos.y != 0x1u) {
upd.mv = true;
--_dat->pos.y;
- axd_wait()
+ return upd;
}
}
axd_chk(ax_key_pads) {
if (_dat->pos.y != 0x9Eu) {
upd.mv = true;
++_dat->pos.y;
- axd_wait()
+ return upd;
}
}
axd_chk(ax_key_padw) {
if (_dat->pos.x != 0x1u) {
upd.mv = true;
--_dat->pos.x;
- axd_wait()
+ return upd;
}
}
- axd_chk(ax_key_a) {upd.drw = true;}
return upd;
}
diff --git a/demo/source/loop.c b/demo/source/loop.c
index 469f62e..e2e608c 100644
--- a/demo/source/loop.c
+++ b/demo/source/loop.c
@@ -25,6 +25,9 @@ bool axd_loop(axd_dat * const _dat) {
_dat->prevcol = ax_rd1(_dat->vaddr,ax_coord(ax_scrnw3,_dat->pos.x,_dat->pos.y));
ax_plot1(_dat->vaddr,ax_coord(ax_scrnw3,_dat->pos.x,_dat->pos.y),0x4u);
}
+ if (upd.keydwn) {
+ while (ax_chkkey(ax_getkeymap(),upd.key)) {}
+ }
}
return err;
}
diff --git a/demo/source/start.c b/demo/source/start.c
index 15ecec6..f7c2d0d 100644
--- a/demo/source/start.c
+++ b/demo/source/start.c
@@ -4,37 +4,50 @@
#include <ax/gfx.h>
static ax_i8 const axd_logo[] = {
- 0x00u,0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x07u,0x08u,0x09u,0x04u,0x04u, 0x04u, 0x0Cu,0x0Du,0x04u,0x04u,0x04u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x06u,0x07u,0x08u,0x09u,0x0Au,0x04u, 0x04u, 0x0Cu,0x0Du,0x0Eu,0x04u,0x10u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x04u,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x04u,0x04u,0x0Eu,0x0Fu,0x10u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x07u,0x08u,0x09u,0x0Au,0x0Bu, 0x04u, 0x04u,0x0Du,0x0Eu,0x0Fu,0x10u,0x05u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x0Eu,0x04u,0x10u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x05u,0x06u,0x04u,0x04u,0x04u,0x0Au,0x0Bu, 0x04u, 0x0Cu,0x0Du,0x04u,0x04u,0x04u,0x05u,0x06u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x04u,0x04u,0x04u,0x00u,0x04u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x04u,0x04u,0x04u,0x00u,0x04u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
- 0x00u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x00u,
- 0x04u,0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,0x04u,
+ 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,
+ 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,
- 0x04u,0x00u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x00u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x00u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x00u,0x04u,
- 0x04u,0x00u, 0x04u,0x03u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u, 0x04u,0x02u,0x02u,0x02u,0x02u,0x02u,0x02u, 0x00u, 0x04u,0x03u,0x04u,0x00u,0x04u,0x03u,0x02u, 0x00u, 0x04u,0x04u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u,0x04u,
- 0x04u,0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x02u,0x02u,0x04u,0x02u,0x03u,0x02u, 0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u,0x04u,
- 0x04u,0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x02u,0x02u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x02u,0x00u,0x02u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u,0x04u,
- 0x04u,0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x03u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u,0x04u,
- 0x04u,0x00u, 0x04u,0x03u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u, 0x04u,0x03u,0x03u,0x03u,0x03u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x03u,0x02u, 0x00u, 0x04u,0x02u,0x03u,0x03u,0x03u,0x02u,0x02u, 0x00u,0x04u,
- 0x04u,0x00u, 0x04u,0x02u,0x02u,0x02u,0x02u,0x02u,0x00u, 0x00u, 0x04u,0x02u,0x02u,0x02u,0x02u,0x02u,0x02u, 0x00u, 0x04u,0x02u,0x00u,0x00u,0x00u,0x02u,0x02u, 0x00u, 0x00u,0x02u,0x02u,0x02u,0x02u,0x02u,0x00u, 0x00u,0x04u,
+ 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u,
+ 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u,
+ 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u,
+ 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x04u,0x04u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u,
+ 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x00u,0x00u,0x04u,0x00u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u,
+ 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u,
+ 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x04u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x04u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x04u,
- 0x04u,0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x00u,0x04u,
- 0x04u,0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,0x04u,
+ 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x04u,
};
-constexpr ax_i8 axd_logow = (0x7u * 0x4u) + (0x2u * 0x2u) + (0x1u * 0x3u);
-constexpr ax_i8 axd_logoh = (0x7u * 0x2u) + (0x2u * 0x2u) + (0x2u);
+constexpr ax_i8 axd_logow = (0x7u * 0x4u) + (0x1u * 0x5u);
+constexpr ax_i8 axd_logoh = (0x7u * 0x2u) + (0x2u) + (0x1u * 0x2u);
static_assert(sizeof (axd_logo) == axd_logow * axd_logoh);
+static ax_i8 const axd_startmsg[] = {
+ 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u,
+ 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x00u,0x04u,0x04u,
+ 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x00u,0x04u,0x04u,
+ 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x04u,0x04u,0x04u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,
+ 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x04u,0x04u,0x04u,0x04u,
+ 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x04u,0x04u,0x04u,
+ 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x00u,0x00u,0x00u,0x00u, 0x0u, 0x04u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x00u,0x00u,0x04u,0x00u,0x00u,0x00u, 0x0u, 0x00u,0x04u,0x04u,0x04u,0x04u,0x04u,0x00u, 0x0u, 0x04u,0x04u,0x00u,0x00u,0x00u,0x04u,0x04u,
+};
+
+constexpr ax_i8 axd_startmsgw = (0x7u * 0x10u) + (0x1u * 0xFu);
+constexpr ax_i8 axd_startmsgh = (0x7u * 0x1u);
+
+static_assert(sizeof (axd_startmsg) == axd_startmsgw * axd_startmsgh);
+
ax_err ax_start(void) {
axd_dat dat;
axd_initdat(&dat);
@@ -43,6 +56,7 @@ ax_err ax_start(void) {
ax_blnk();
ax_clrscrn1(dat.vaddr,0x0u);
ax_plottex1(dat.vaddr,ax_scrnw3,axd_logo,ax_coord(ax_scrnw3,ax_scrnw3 / 0x2u - axd_logow / 0x2u,ax_scrnh3 / 0x2u - axd_logoh / 0x2u),axd_logow,axd_logoh);
+ ax_plottex1(dat.vaddr,ax_scrnw3,axd_startmsg,ax_coord(ax_scrnw3,ax_scrnw3 / 0x2u - axd_startmsgw / 0x2u,ax_scrnh3 - 0x7u - axd_startmsgh),axd_startmsgw,axd_startmsgh);
ax_key startkey;
for (;;) {
ax_keymap const keymap = ax_getkeymap();
@@ -88,7 +102,7 @@ ax_err ax_start(void) {
}
}
ax_vsync();
- ax_clrscrn1(dat.vaddr,0x0u);
+ ax_rec1(dat.vaddr,ax_scrnw3,ax_coord(ax_scrnw3,ax_scrnw3 / 0x2u - axd_startmsgw / 0x2u,ax_scrnh3 - 0x7u - axd_startmsgh),axd_startmsgw,axd_startmsgh,0x0u);
for (;;) { /* Wait for the key to be released. */
ax_keymap const keymap = ax_getkeymap();
if (!ax_chkkey(keymap,startkey)) {