summaryrefslogtreecommitdiff
path: root/agbx
diff options
context:
space:
mode:
Diffstat (limited to 'agbx')
-rw-r--r--agbx/GNUmakefile92
-rw-r--r--agbx/include-private/ax/priv.h46
-rw-r--r--agbx/include/ax/bs.h51
-rw-r--r--agbx/include/ax/gfx.h48
-rw-r--r--agbx/include/ax/key.h33
-rw-r--r--agbx/source/bs/done.c22
-rw-r--r--agbx/source/bs/get.s39
-rw-r--r--agbx/source/bs/set.s39
-rw-r--r--agbx/source/gfx/clrscrn.cc23
-rw-r--r--agbx/source/gfx/flip.s39
-rw-r--r--agbx/source/gfx/getvbnk.s62
-rw-r--r--agbx/source/gfx/plot.c31
-rw-r--r--agbx/source/gfx/plottex.cc29
-rw-r--r--agbx/source/gfx/rd.s32
-rw-r--r--agbx/source/gfx/vsync.s37
-rw-r--r--agbx/source/key/getkeymap.s27
-rw-r--r--agbx/source/priv/init.s25
17 files changed, 0 insertions, 675 deletions
diff --git a/agbx/GNUmakefile b/agbx/GNUmakefile
deleted file mode 100644
index e3ea1b0..0000000
--- a/agbx/GNUmakefile
+++ /dev/null
@@ -1,92 +0,0 @@
-# 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>.
-
-# TOOLS
-
-AS := arm-none-eabi-as
-#CC := arm-none-eabi-gcc -Dbool="_Bool" -Dfalse="((_Bool)+0x0u)" -Dfalse="((_Bool)+0x0u)"
-CC := clang --target=arm-none-eabi
-#CXX := arm-none-eabi-g++
-CXX := clang++ --target=arm-none-eabi
-OBJCOPY := arm-none-eabi-objcopy
-
-# TOOL FLAGS
-
-CFLAGS := \
- -Iinclude \
- -Iinclude-private \
- -Ofast \
- -Wall \
- -Wextra \
- -Wpedantic \
- -Wno-gnu-binary-literal \
- -Wno-gnu-empty-initializer \
- -ffreestanding \
- -fno-builtin \
- -fno-strict-aliasing \
- -fshort-enums \
- -mcpu=arm7tdmi \
- -mthumb \
- -mtune=arm7tdmi \
- -nostdlib \
- -std=c2x
-
-CXXFLAGS := \
- -Iinclude \
- -Iinclude-private \
- -Ofast \
- -Wall \
- -Wextra \
- -Wpedantic \
- -ffreestanding \
- -fno-builtin \
- -fno-exceptions \
- -fno-strict-aliasing \
- -fshort-enums \
- -mcpu=arm7tdmi \
- -mthumb \
- -mtune=arm7tdmi \
- -nostdlib \
- -std=c++2b
-
-# HEADERS
-
-HDRS := \
- include/ax/bs.h \
- include/ax/gfx.h \
- include/ax/key.h \
- include-private/ax/priv.h
-
-# BINARIES
-
-OBJS := \
- source/bs/done.o \
- source/bs/get.o \
- source/bs/set.o \
- source/gfx/clrscrn.o \
- source/gfx/flip.o \
- source/gfx/getvbnk.o \
- source/gfx/plot.o \
- source/gfx/plottex.o \
- source/gfx/rd.o \
- source/gfx/vsync.o \
- source/key/getkeymap.o \
- source/priv/init.o
-
-LIB := libagbx.a
-
-# TARGETS
-
-.PHONY: clean purge
-
-$(LIB): $(OBJS)
- $(AR) r $(@) $(^)
-
-$(OBJS): $(HDRS)
-
-clean:
- $(RM) $(OBJS)
-
-purge: clean
- $(RM) $(LIB)
diff --git a/agbx/include-private/ax/priv.h b/agbx/include-private/ax/priv.h
deleted file mode 100644
index 677d77f..0000000
--- a/agbx/include-private/ax/priv.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- 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>.
-*/
-
-#if !defined(__ax_hdr_priv)
-#define __ax_hdr_priv
-
-#include <ax/bs.h>
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#define __ax_get10(_addr) (*(ax_i01 volatile *)_addr)
-
-#define __ax_get20(_addr) (*(ax_i02 volatile *)_addr)
-
-#define __ax_get8(_addr) (*(ax_i8 volatile *)_addr)
-
-#define __ax_set10(_addr,_val) ((void)(*(ax_i01 volatile *)_addr = _val))
-
-#define __ax_set20(_addr,_val) ((void)(*(ax_i02 volatile *)_addr = _val))
-
-#define __ax_set8(_addr,_val) ((void)(*(ax_i8 volatile *)_addr = _val))
-
-#define __ax_plot2(_vaddr,_px,_col) { \
- ax_i02 const addr = _vaddr + _px * 0x2u; /* We multiply it by two as each pixel takes up two bytes. */ \
- __ax_set10(addr,_col); \
-}
-
-#if defined(__cplusplus)
-}
-#endif
-
-#if defined(__cplusplus)
-
-template<typename _ltyp,typename _rtyp> struct __ax_typeqimpl {constexpr static bool eq = false;};
-template<typename _typ> struct __ax_typeqimpl<_typ,_typ> {constexpr static bool eq = true;};
-
-template<typename _ltyp,typename _rtyp> constexpr bool __ax_typeq = ::__ax_typeqimpl<_ltyp,_rtyp>::eq;
-
-#endif
-
-#endif
diff --git a/agbx/include/ax/bs.h b/agbx/include/ax/bs.h
deleted file mode 100644
index 0bcfbd7..0000000
--- a/agbx/include/ax/bs.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- 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>.
-*/
-
-#if !defined(__ax_hdr_bs)
-#define __ax_hdr_bs
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-#if !defined(__cplusplus)
-/* C23 compatibility: */
-#define constexpr static const
-#endif
-
-typedef unsigned short ax_i01;
-typedef unsigned int ax_i02;
-typedef unsigned long long ax_i04;
-typedef unsigned char ax_i8;
-
-typedef enum {
- ax_err_ok = 0x0u,
- ax_err_badaddr,
- ax_err_badalgn,
- ax_err_badcol,
- ax_err_badmd,
- ax_err_pos2big,
- ax_err_px2big,
- ax_err_max = 0xFFu,
-} ax_err;
-
-constexpr ax_i04 ax_ver = 0x9u;
-
-[[noreturn]] void ax_done(ax_err err);
-
-[[nodiscard]] ax_i01 ax_get10(ax_i02 addr);
-[[nodiscard]] ax_i02 ax_get20(ax_i02 addr);
-[[nodiscard]] ax_i8 ax_get8( ax_i02 addr);
-
-void ax_set10(ax_i02 addr,ax_i01 val);
-void ax_set20(ax_i02 addr,ax_i02 val);
-void ax_set8( ax_i02 addr,ax_i8 val);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
diff --git a/agbx/include/ax/gfx.h b/agbx/include/ax/gfx.h
deleted file mode 100644
index 56405f1..0000000
--- a/agbx/include/ax/gfx.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- 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>.
-*/
-
-#if !defined(__ax_hdr_gfx)
-#define __ax_hdr_gfx
-
-#include <ax/bs.h>
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-constexpr ax_i8 ax_scrnw3 = 0xF0u;
-constexpr ax_i8 ax_scrnw5 = 0xA0u;
-constexpr ax_i8 ax_scrnh3 = 0xA0u;
-constexpr ax_i8 ax_scrnh5 = 0x80u;
-
-#define ax_coord(_scrnw,_x,_y) ((ax_i01)((ax_i01)(_y) * (ax_i01)(_scrnw) + (ax_i01)(_x)))
-
-#define ax_col(_r,_g,_b) ((ax_i01)(((ax_i01)(_r) | (ax_i01)(_g) << 0x5u | (ax_i01)(_b) << 0xAu) & 0b000000111111111111111))
-
-ax_i02 ax_flip( void);
-ax_i02 ax_getvbnk(void);
-void ax_vsync( void);
-
-void ax_clrscrn1(ax_i02 vaddr,ax_i8 col);
-void ax_clrscrn2(ax_i02 vaddr,ax_i01 col);
-
-void ax_plot1(ax_i02 vaddr,ax_i01 px, ax_i8 col);
-void ax_plot2(ax_i02 vaddr,ax_i01 px, ax_i01 col);
-
-void ax_plottex1(ax_i02 vaddr,ax_i8 scrnw,ax_i8 const * tex,ax_i01 px,ax_i8 w,ax_i8 h);
-void ax_plottex2(ax_i02 vaddr,ax_i8 scrnw,ax_i01 const * tex,ax_i01 px,ax_i8 w,ax_i8 h);
-
-ax_i8 ax_rd1(ax_i02 vaddr,ax_i01 px);
-ax_i01 ax_rd2(ax_i02 vaddr,ax_i01 px);
-
-void ax_cir1(ax_i02 vaddr,ax_i8 scrnw,ax_i01 px,ax_i8 r,ax_i8 col);
-void ax_cir2(ax_i02 vaddr,ax_i8 scrnw,ax_i01 px,ax_i8 r,ax_i01 col);
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif
diff --git a/agbx/include/ax/key.h b/agbx/include/ax/key.h
deleted file mode 100644
index 88d6250..0000000
--- a/agbx/include/ax/key.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- 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>.
-*/
-
-#if !defined(__ax_hdr_key)
-#define __ax_hdr_key
-
-#include <ax/bs.h>
-
-typedef enum {
- ax_key_a = 0x0u,
- ax_key_b = 0x1u,
- ax_key_l = 0x9u,
- ax_key_pade = 0x4u,
- ax_key_padn = 0x6u,
- ax_key_pads = 0x7u,
- ax_key_padw = 0x5u,
- ax_key_r = 0x8u,
- ax_key_sel = 0x2u,
- ax_key_start = 0x3u,
-} ax_key;
-
-typedef struct {
- ax_i01 _keys;
-} ax_keymap;
-
-#define ax_chkkey(_map,_key) (!(bool)((_map)._keys >> (ax_i01)(_key) & 0x1u))
-
-ax_keymap ax_getkeymap(void);
-
-#endif
diff --git a/agbx/source/bs/done.c b/agbx/source/bs/done.c
deleted file mode 100644
index 17b55c6..0000000
--- a/agbx/source/bs/done.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- 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>
-
-void ax_done(ax_err const _err) {
- if (_err == ax_err_ok) {
- __asm__ (
- "svc 0x3\n"
- );
- __builtin_unreachable();
- }
- __asm__ (
- "svc 0x2\n"
- );
- for (;;) {}
-}
diff --git a/agbx/source/bs/get.s b/agbx/source/bs/get.s
deleted file mode 100644
index a936f73..0000000
--- a/agbx/source/bs/get.s
+++ /dev/null
@@ -1,39 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.globl ax_get10
-.globl ax_get20
-.globl ax_get8
-
-.func
-.thumb_func
-
-ax_get10:
- ldrh r0,[r0] @ ax_i01 val = *(ax_i01 *)addr;
- bx lr @ return val;
-
-.endfunc
-
-.func
-.thumb_func
-
-ax_get20:
- ldr r0,[r0] @ ax_i02 val = *(ax_i02 *)addr;
- bx lr @ return val;
-
-.endfunc
-
-.func
-.thumb_func
-
-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
deleted file mode 100644
index 1719be6..0000000
--- a/agbx/source/bs/set.s
+++ /dev/null
@@ -1,39 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.globl ax_set10
-.globl ax_set20
-.globl ax_set8
-
-.func
-.thumb_func
-
-ax_set10:
- strh r1,[r0] @ *(ax_i01 *)addr = val;
- bx lr @ return;
-
-.endfunc
-
-.func
-.thumb_func
-
-ax_set20:
- str r1,[r0] @ *(ax_i02 *)addr = val;
- bx lr @ return;
-
-.endfunc
-
-.func
-.thumb_func
-
-ax_set8:
- strb r1,[r0] @ *(ax_i8 *)addr = val;
- bx lr @ return;
-
-.endfunc
diff --git a/agbx/source/gfx/clrscrn.cc b/agbx/source/gfx/clrscrn.cc
deleted file mode 100644
index 8f27268..0000000
--- a/agbx/source/gfx/clrscrn.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- 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_clrscrn(::ax_i02 const _vaddr,_pxtyp const _col) noexcept -> void {
- static_assert(::__ax_typeq<_pxtyp,::ax_i8> || ::__ax_typeq<_pxtyp,::ax_i01>);
- ::ax_i02 const val = [&_col] {
- if constexpr (::__ax_typeq<_pxtyp,::ax_i01>) {
- return (ax_i02)_col | (ax_i02)_col << 0x10u;
- }
- return (ax_i02)_col | (ax_i02)_col << 0x8u | (ax_i02)_col << 0x10u | (ax_i02)_col << 0x18u;
- }();
- for (::ax_i02 addr = _vaddr;addr != _vaddr + 0x9600u;addr += 0x4u) {__ax_set20(addr,val);}
-}
-
-extern "C" auto ax_clrscrn1(::ax_i02 const _vaddr,::ax_i8 const _col) -> void {::__ax_clrscrn(_vaddr,_col);}
-extern "C" auto ax_clrscrn2(::ax_i02 const _vaddr,::ax_i01 const _col) -> void {::__ax_clrscrn(_vaddr,_col);}
diff --git a/agbx/source/gfx/flip.s b/agbx/source/gfx/flip.s
deleted file mode 100644
index 887377d..0000000
--- a/agbx/source/gfx/flip.s
+++ /dev/null
@@ -1,39 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.extern __ax_getvbnk
-
-.globl ax_flip
-
-.func
-.thumb_func
-
-ax_flip:
- @ Get the current value of dispcnt:
- ldr r0,.dispcntaddr @ ax_i02 dispcntaddr = 0x4000000u;
- ldrh r1,[r0] @ ax_i01 dispcnt = *(ax_i01 *)dispcntaddr;
-
- @ XOR bit five:
- movs r2,0b10000
- eors r1,r2 @ dispcnt ^= 0b10000u;
-
- @ Save dispcnt:
- strh r1,[r0] @ *(ax_i01 *)dispcntaddr = dispcnt;
-
- @ Get the address of the video bank:
- b __ax_getvbnk @ ax_i02 vaddr = __ax_getvbnk();
-
- bx lr @ return vaddr;
-
-.endfunc
-
-.align
-
-.dispcntaddr:
- .long 0x4000000
diff --git a/agbx/source/gfx/getvbnk.s b/agbx/source/gfx/getvbnk.s
deleted file mode 100644
index d3dcbcf..0000000
--- a/agbx/source/gfx/getvbnk.s
+++ /dev/null
@@ -1,62 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.globl __ax_getvbnk
-.globl ax_getvbnk
-
-.func
-.thumb_func
-
-ax_getvbnk:
- @ Get the current value of dispcnt:
- ldr r0,.dispcntaddr @ ax_i02 dispcntaddr = 0x4000000u;
- ldrh r1,[r0] @ ax_i01 dispcnt = *(ax_i01 *)dispcntaddr;
-
- @ Get the address:
- b __ax_getvbnk @ ax_i02 vaddr = __ax_getvbnk();
-
- bx lr @ return vaddr;
-
-.endfunc
-
-.func
-.thumb_func
-
-__ax_getvbnk: @ Takes the value of dispcnt in r1.
- @ Check if the fifth bit is set:
- movs r0,0b10000
- tst r1,r0
- beq .vbnk1
-
-.vbnk0:
- @ Return the address of the first video bank:
- ldr r0,.vbnk0addr
- bx lr
-
-.vbnk1:
- @ Return the address of the second video bank:
- ldr r0,.vbnk1addr
- bx lr
-
-.endfunc
-
-.align
-
-.dispcntaddr:
- .long 0x4000000
-
-.align
-
-.vbnk0addr:
- .long 0x6000000
-
-.align
-
-.vbnk1addr:
- .long 0x600A000
diff --git a/agbx/source/gfx/plot.c b/agbx/source/gfx/plot.c
deleted file mode 100644
index 066b97e..0000000
--- a/agbx/source/gfx/plot.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- 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>
-
-void ax_plot1(ax_i02 const _vaddr,ax_i01 const _px,ax_i8 const _col) {
- /* We can only write halfwords to VRAM, so we need to load the adjacent pixel value and combine it into a halfword. */
- bool const odd = _px & 0x1u;
- ax_i02 addr = _vaddr + _px - odd;
- ax_i01 precol = __ax_get10(addr);
- ax_i01 col = _col;
- if (odd) {
- precol &= 0b11111111u;
- col <<= 0x8u;
- }
- else {
- precol &= 0b1111111100000000u;
- }
- ax_i01 const newcol = precol | col;
- __ax_set10(addr,newcol);
-}
-
-void ax_plot2(ax_i02 const _vaddr,ax_i01 const _px,ax_i01 const _col) {
- ax_i02 const addr = _vaddr + _px;
- __ax_set10(addr,_col);
-}
diff --git a/agbx/source/gfx/plottex.cc b/agbx/source/gfx/plottex.cc
deleted file mode 100644
index 836a6ff..0000000
--- a/agbx/source/gfx/plottex.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- 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_plottex(::ax_i02 const _vaddr,::ax_i8 const _scrnw,_pxtyp const * const _tex,::ax_i01 const _px,::ax_i8 const _w,::ax_i8 const _h) noexcept -> void {
- static_assert(::__ax_typeq<_pxtyp,::ax_i8> || ::__ax_typeq<_pxtyp,::ax_i01>);
- _pxtyp const * texpos = _tex;
- 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,*(texpos++));
- }
- else {
- ax_plot1(_vaddr,px,*(texpos++));
- }
- }
- px = rowstart + _scrnw;
- }
-}
-
-extern "C" auto ax_plottex1(::ax_i02 const _vaddr,::ax_i8 const _scrnw,::ax_i8 const * const _tex,::ax_i01 const _px,::ax_i8 const _w,::ax_i8 const _h) -> void {::__ax_plottex(_vaddr,_scrnw,_tex,_px,_w,_h);}
-extern "C" auto ax_plottex2(::ax_i02 const _vaddr,::ax_i8 const _scrnw,::ax_i01 const * const _tex,::ax_i01 const _px,::ax_i8 const _w,::ax_i8 const _h) -> void {::__ax_plottex(_vaddr,_scrnw,_tex,_px,_w,_h);}
diff --git a/agbx/source/gfx/rd.s b/agbx/source/gfx/rd.s
deleted file mode 100644
index 6662848..0000000
--- a/agbx/source/gfx/rd.s
+++ /dev/null
@@ -1,32 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.globl ax_rd1
-.globl ax_rd2
-
-.func
-.thumb_func
-
-ax_rd1:
- adds r0,r1 @ Get the address of the pixel by adding the offset to the video address.
- ldrh r0,[r0]
- bx lr
-
-.endfunc
-
-.func
-.thumb_func
-
-ax_rd2:
- adds r0,r1 @ Get the address of the pixel by adding the offset to the video address.
- adds r0,r1 @ Add the offset twice as each pixel takes up two bytes.
- ldrh r0,[r0]
- bx lr
-
-.endfunc
diff --git a/agbx/source/gfx/vsync.s b/agbx/source/gfx/vsync.s
deleted file mode 100644
index e16724f..0000000
--- a/agbx/source/gfx/vsync.s
+++ /dev/null
@@ -1,37 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.globl ax_vsync
-
-.func
-.thumb_func
-
-ax_vsync:
- @ Set the constants:
- ldr r0,.vcountaddr @ ax_i02 vcountaddr = 0x4000006u;
- movs r1,0xA0 @ ax_i02 numhline = 0xA0;
-
-.loop:
- @ Check the scanline counter:
- ldrh r2,[r0] @ ax_i02 vcount = *(ax_i01 *)vcountaddr;
- cmp r2,r1
- beq .ret @ if (vcount == numhline) {goto ret;}
-
- b .loop @ goto loop;
-
-.ret:
- @ Return:
- bx lr @ return;
-
-.endfunc
-
-.align
-
-.vcountaddr:
- .long 0x4000006
diff --git a/agbx/source/key/getkeymap.s b/agbx/source/key/getkeymap.s
deleted file mode 100644
index 2751c9f..0000000
--- a/agbx/source/key/getkeymap.s
+++ /dev/null
@@ -1,27 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.globl ax_getkeymap
-
-.func
-.thumb_func
-
-ax_getkeymap:
- @ Load the keys:
- ldr r0,.addr @ ax_i02 addr = 0x4000130u;
- ldrh r0,[r0] @ ax_keymap keymap = *(ax_i01 *)addr;
-
- bx lr @ return keymap;
-
-.endfunc
-
-.align
-
-.addr:
- .long 0x4000130
diff --git a/agbx/source/priv/init.s b/agbx/source/priv/init.s
deleted file mode 100644
index 718638d..0000000
--- a/agbx/source/priv/init.s
+++ /dev/null
@@ -1,25 +0,0 @@
-@ 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>.
-
-.syntax unified
-
-.cpu arm7tdmi
-.thumb
-
-.extern ax_done
-.extern ax_start
-
-.globl __ax_init
-
-.func
-.thumb_func
-
-__ax_init:
- @ Call main:
- bl ax_start
-
- @ Call done:
- bl ax_done @ The return value is already in r0, so there's no need to move it.
-
-.endfunc