Skip to content

Instantly share code, notes, and snippets.

@felixjones
felixjones / GBA_Capture_tvap-0.7z
Last active November 11, 2024 18:56
Blaze Game Boy Advance TV Tuner ROM dump
@felixjones
felixjones / readme.md
Created May 23, 2021 12:10
GBA Tiled format plan

High level idea

Tiled export format that is usable in Game Boy Advance projects.

GBA limitations

Layers

Tiled should export based on a desired target GBA mode and desired number of layers.

Merging layers

To support the desired mode & layers, Tiled layers must be merged.

  • How do we let the user control this merging?

Palettes

Colour quantisation and palette allocation.

@felixjones
felixjones / thread.c
Created March 14, 2021 11:35
AGB thread attempt
#include <stdlib.h>
#include <thread.h>
#include <sys/ucontext.h>
int __agbabi_getcontext( ucontext_t * );
int __agbabi_setcontext( const ucontext_t * ) ;
void __agbabi_makecontext( ucontext_t *, void ( * )( void ), int, ... );
int __agbabi_swapcontext( ucontext_t *, const ucontext_t * );
@felixjones
felixjones / bz5e.tbl
Created November 8, 2020 15:16
Final Fantasy V Text Tables
00=
01=e
02=t
03=a
04=o
05=n
06=s
07=r
08=i
09=h
@felixjones
felixjones / AutoGamma.zip
Last active February 7, 2024 09:23
Auto Gamma
@felixjones
felixjones / Teasource.zip
Last active March 11, 2021 11:00
The Teasource Pack
@felixjones
felixjones / hello_world.cpp
Created October 13, 2019 22:53
gba++ clone of rust gba-console's hello_world.rs example
#include <gba/gba.hpp>
#define EVER ;;
using namespace gba;
static auto& DISPCNT = io::display::control;
static auto& DISPSTAT = io::display::status;
static auto& IE = io::interrupt::enable_mask;
static auto& IME = io::interrupt::master_enable;
@felixjones
felixjones / mode1_3d.cpp
Created April 28, 2019 11:58
C++ Mode 1 3D perspective camera for Game Boy Advance
#include <gba.hpp>
#include <gba_debug.hpp>
#include <gba_nitro.hpp>
#include "res_assets.h"
#define EVER ;;
using namespace gba;
@felixjones
felixjones / fire.arm.cpp
Last active March 21, 2019 13:25
C++ fire effect for Game Boy Advance
#include <gba.hpp>
#define EVER ;;
using namespace gba;
// Palette of fire "heat" values
static constexpr color::bgr555 fire_colors[] = {
color::rgb888( 0x070707 ), color::rgb888( 0x1F0707 ), color::rgb888( 0x2F0F07 ), color::rgb888( 0x470F07 ),
color::rgb888( 0x571707 ), color::rgb888( 0x671F07 ), color::rgb888( 0x771F07 ), color::rgb888( 0x8F2707 ),