Skip to content

Instantly share code, notes, and snippets.

View Lokathor's full-sized avatar
🌴
Workin' on Rust Stuff

Lokathor Lokathor

🌴
Workin' on Rust Stuff
View GitHub Profile

Here are the steps to setup mgba as well as the development tools that you'll need to build GBA roms on your Raspberry Pi. I did this on a Pi4, but it should work on a Pi3 or even a Pi2 just as well.

  • un-comment the sources repo in /etc/apt/sources.list using your editor of choice (requires root of course).

  • sudo apt-get update to get fresh sources info

  • sudo apt build-dep mgba-qt to install all the dependencies of the Qt

@Lokathor
Lokathor / magic_macro.md
Last active December 8, 2019 15:46
Blog post about how to build `cfg_if` style macro.

Diving in to cfg_if!

How exactly does the cfg_if! macro do its thing?

First of all what is the cfg_if! macro? It's a macro to help you pick a set of code based on compile-time configutation. There is a sample usage on the docs page:

Cargo Crev Quickstart

You should consider using cargo-crev more often.

  • Installation: You need to obtain OpenSLL, and then cargo install cargo-crev
  • (All commands from here are for cargo-crev 0.13.0; command usage may change in the future)
  • Make Your ID: cargo crev id new --url [repo_url]
    • This prompts for a password that will protect the ID.
    • This is the cryptographic style "you can't ever recover this" type of password.
    • Keep it secret and keep it safe.
🎵 When a humble Mem
graced a ride along
with Loka of Thoria
along came this song.
From when the Glider fought
a foreign-tongued repo
its unsynch'd globals
the ey pi ai's credo.
## An improved version of the "official" rust highlight file, Licensed GPL v3
syntax "rust" "\.rs"
comment "//"
# The order of these colorations is significant.
# Matches later down will re-color earlier matches.
# Thus, we place the most general matches first and allow them to be overriden later if necessary.
# Function definitions
pub enum CpuOp {
Alu{op:AluOp, rhs:AluArg},
Data{op:DataOp, data:DataArg},
Rst(u8),
Load{dst:DataArg, src:AluArg},
Call{cond:Cond, addr:u16},
Jump{cond:Cond, addr:u16},
JumpRel{cond:Cond, delta:i8},
Ret{cond:Cond}
Stop, Halt, Di, Ei, Ccf, Cpl,