summaryrefslogtreecommitdiff
path: root/agbx/source/bs
diff options
context:
space:
mode:
Diffstat (limited to 'agbx/source/bs')
-rw-r--r--agbx/source/bs/done.c42
-rw-r--r--agbx/source/bs/get.s18
-rw-r--r--agbx/source/bs/set.s18
3 files changed, 39 insertions, 39 deletions
diff --git a/agbx/source/bs/done.c b/agbx/source/bs/done.c
index 64130e3..e302244 100644
--- a/agbx/source/bs/done.c
+++ b/agbx/source/bs/done.c
@@ -4,38 +4,38 @@
If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
-#include <agbx/priv.h>
+#include <ax/priv.h>
-#include <agbx/gfx.h>
+#include <ax/gfx.h>
-void agbx_done(agbx_err const _err) {
- if (_err == agbx_err_ok) {
+void ax_done(ax_err const _err) {
+ if (_err == ax_err_ok) {
__asm__ (
"svc 0x3\n"
);
__builtin_unreachable();
}
/* Display the barcode-like error message: */
- agbx_set10(0x400'0000u,0x404u);
- agbx_set10(0x500'0000u,0x0u);
- agbx_set10(0x500'0002u,0b11111u);
- agbx_i8 err[0xBu];
- for (agbx_i8 pos = 0x0u;pos != 0x8u;++pos) {err[pos] = (agbx_i8)_err >> pos & 0x1u;}
+ ax_set10(0x400'0000u,0x404u);
+ ax_set10(0x500'0000u,0x0u);
+ ax_set10(0x500'0002u,0b11111u);
+ ax_i8 err[0xBu];
+ for (ax_i8 pos = 0x0u;pos != 0x8u;++pos) {err[pos] = (ax_i8)_err >> pos & 0x1u;}
err[0x8u] = 0x0u;
err[0x9u] = 0x1u;
err[0xAu] = 0x0u;
- for (agbx_i10 pos = 0x0u;pos != 0x9600u;pos += 0xF0u) {
- agbx_setpx1(0x600'0000u,pos, err[0x0u]);
- agbx_setpx1(0x600'0000u,pos + 0x1u,err[0x1u]);
- agbx_setpx1(0x600'0000u,pos + 0x2u,err[0x2u]);
- agbx_setpx1(0x600'0000u,pos + 0x3u,err[0x3u]);
- agbx_setpx1(0x600'0000u,pos + 0x4u,err[0x4u]);
- agbx_setpx1(0x600'0000u,pos + 0x5u,err[0x5u]);
- agbx_setpx1(0x600'0000u,pos + 0x6u,err[0x6u]);
- agbx_setpx1(0x600'0000u,pos + 0x7u,err[0x7u]);
- agbx_setpx1(0x600'0000u,pos + 0x8u,err[0x8u]);
- agbx_setpx1(0x600'0000u,pos + 0x9u,err[0x9u]);
- agbx_setpx1(0x600'0000u,pos + 0xAu,err[0xAu]);
+ for (ax_i10 pos = 0x0u;pos != 0x9600u;pos += 0xF0u) {
+ ax_setpx1(0x600'0000u,pos, err[0x0u]);
+ ax_setpx1(0x600'0000u,pos + 0x1u,err[0x1u]);
+ ax_setpx1(0x600'0000u,pos + 0x2u,err[0x2u]);
+ ax_setpx1(0x600'0000u,pos + 0x3u,err[0x3u]);
+ ax_setpx1(0x600'0000u,pos + 0x4u,err[0x4u]);
+ ax_setpx1(0x600'0000u,pos + 0x5u,err[0x5u]);
+ ax_setpx1(0x600'0000u,pos + 0x6u,err[0x6u]);
+ ax_setpx1(0x600'0000u,pos + 0x7u,err[0x7u]);
+ ax_setpx1(0x600'0000u,pos + 0x8u,err[0x8u]);
+ ax_setpx1(0x600'0000u,pos + 0x9u,err[0x9u]);
+ ax_setpx1(0x600'0000u,pos + 0xAu,err[0xAu]);
}
__asm__ (
"svc 0x2\n"
diff --git a/agbx/source/bs/get.s b/agbx/source/bs/get.s
index b827dec..7068aaf 100644
--- a/agbx/source/bs/get.s
+++ b/agbx/source/bs/get.s
@@ -7,15 +7,15 @@
.cpu arm7tdmi
.thumb
-.globl agbx_get10
-.globl agbx_get20
-.globl agbx_get8
+.globl ax_get10
+.globl ax_get20
+.globl ax_get8
.func
.thumb_func
-agbx_get10:
- ldrh r0,[r0] @ agbx_i10 val = *(agbx_i10 *)addr;
+ax_get10:
+ ldrh r0,[r0] @ ax_i10 val = *(ax_i10 *)addr;
bx lr @ return val;
.endfunc
@@ -23,8 +23,8 @@ agbx_get10:
.func
.thumb_func
-agbx_get20:
- ldr r0,[r0] @ agbx_i20 val = *(agbx_i20 *)addr;
+ax_get20:
+ ldr r0,[r0] @ ax_i20 val = *(ax_i20 *)addr;
bx lr @ return val;
.endfunc
@@ -32,8 +32,8 @@ agbx_get20:
.func
.thumb_func
-agbx_get8:
- ldrb r0,[r0] @ agbx_i8 val = *(agbx_i8 *)addr;
+ax_get8:
+ ldrb r0,[r0] @ ax_i8 val = *(ax_i8 *)addr;
bx lr @ return val;
.endfunc
diff --git a/agbx/source/bs/set.s b/agbx/source/bs/set.s
index 85e6372..18e7218 100644
--- a/agbx/source/bs/set.s
+++ b/agbx/source/bs/set.s
@@ -7,15 +7,15 @@
.cpu arm7tdmi
.thumb
-.globl agbx_set10
-.globl agbx_set20
-.globl agbx_set8
+.globl ax_set10
+.globl ax_set20
+.globl ax_set8
.func
.thumb_func
-agbx_set10:
- strh r1,[r0] @ *(agbx_i10 *)addr = val;
+ax_set10:
+ strh r1,[r0] @ *(ax_i10 *)addr = val;
bx lr @ return;
.endfunc
@@ -23,8 +23,8 @@ agbx_set10:
.func
.thumb_func
-agbx_set20:
- str r1,[r0] @ *(agbx_i20 *)addr = val;
+ax_set20:
+ str r1,[r0] @ *(ax_i20 *)addr = val;
bx lr @ return;
.endfunc
@@ -32,8 +32,8 @@ agbx_set20:
.func
.thumb_func
-agbx_set8:
- strb r1,[r0] @ *(agbx_i8 *)addr = val;
+ax_set8:
+ strb r1,[r0] @ *(ax_i8 *)addr = val;
bx lr @ return;
.endfunc