Skip to content

Instantly share code, notes, and snippets.

View laqieer's full-sized avatar

laqieer

View GitHub Profile
@loveemu
loveemu / gba-custom-driver.txt
Created March 24, 2015 12:53
GBA games with custom music driver (not all games)
0009 - Konami Wai Wai Racing Advance (Konami)
0012 - Power Pro Kun Pocket 3 (Konami)
0015 - Fire Pro Wrestling A (Spike)
0020 - Yu-Gi-Oh! Dungeon Dice Monsters (Konami)
0022 - J.League Pocket (Konami)
0024 - Monster Guardians (Konami)
0028 - Iridion 3D (Majesco Sales)
0030 - Ready 2 Rumble Boxing - Round 2 (Midway)
0031 - Konami Krazy Racers (Konami)
0033 - Tony Hawk's Pro Skater 2 (Activision)
@yszheda
yszheda / BMFontGenerator.sh
Created December 9, 2015 11:48
generate BMFont from a set of pngs
#!/bin/bash
if [ $1 == "-h" ]; then
echo "Usage: "
echo "$(basename $0) <inputPath> <prefix>"
echo "generate png and fnt under <inputPath>/output"
echo "<inputPath>: path containing images"
echo "<prefix>: prefix of output file names"
exit 0
fi
inputPath=$1
@nitaku
nitaku / AppView.coffee
Last active February 12, 2022 19:14
Chinese text editor
window.AppView = class AppView extends View
constructor: (conf) ->
super(conf)
new Editor
parent: this
@krhoyt
krhoyt / blockhash.js
Created May 31, 2017 19:44
Image Hashing in the Browser
// Original source:
// https://github.com/commonsmachinery/blockhash-js
// Update for local file reading
// Update (loosely) for ES6
// Removes dependencies from origina project
class Blockhash {
constructor() {
this.canvas = document.createElement( 'canvas' );
this.canvas.style.visibility = 'hidden';
this.canvas.style.position = 'absolute';
@MZachmann
MZachmann / BitmapFontHelpers.py
Last active February 6, 2022 23:48
Python Code For Bitmap Font Translation
# this is a set of functions to convert from a bitmap image and fnt to
# C++ compatible data streams for use by LargeFont
import png
# This requires a variable named font, which is the font name font='Arial11'
Basepath = '/users/mark/my documents/'
font = 'Arial11'
ClipPng(font)
FntToInfo(font)
# -------------------------------------------------------
@hax0kartik
hax0kartik / export_symbol.idc
Last active January 24, 2024 16:06
Export symbols from IDA to a ghidra importable symbol file
#include <idc.idc>
static FuncDump(f, start)
{
auto ea, str, count, ref;
auto end;
auto teststr;
ea = start;
@doccaico
doccaico / build.md
Created November 27, 2020 01:18
Fire Emblem - Heroes Remake Gaiden (FEHRG) のビルド方法 (on Linux)

Fire Emblem - Heroes Remake Gaiden (FEHRG) のビルド方法 (on Linux)

# install

$ cd ~/Downloads
$ sudo dpkg -i devkitpro-pacman.amd64.deb
@zeichensystem
zeichensystem / gba-mode-switching.c
Created May 22, 2021 06:35
Game Boy Advance flicker-free mode switching
#include <tonc.h>
/*
Self-contained example demonstrating flicker-free switching between the page-flipping display modes
of the GBA (i.e. the bitmap modes 4 and 5).
The problem: If done carelessly, switching between the page-flipping display modes can lead to essentially
random persisting flickering/screen tearing.
The solution: If we intend to switch modes by writing to REG_DISPCNT and the front page (vid_mem_front) is
the write-page (which is always pointed to by vid_page), then it is necessary to indicate the back page
should be the displayed one (and *not* the front page) by setting the DCNT_PAGE bits.
@aldelaro5
aldelaro5 / ghidra_mgba_gdb.md
Last active October 4, 2023 07:56
Debugging with ghidra + mgba's GDB server

CURRENTLY WORKS MOSTLY FOR LINUX, WINDOWS INSTRUCTIONS WILL BE WRITTEN EVENTUALLY

Requirements

  • mgba BUILT FROM SOURCE, this is because you need some changes that as of this writting, aren't present in the lattest version (0.9.3). They will only be present in a release in 0.10.0+
  • Ghidra 10.0.3+ (you NEED 10.0.3+ due to fixes being applied that specifically impacts this process as well as a feature that allows to sync the static listing with the dynamic listing). I recommend however to install the lattest version at the time you are setting this up and upgrade as you feel like it (projects are usually upwards compatible, but the opposite isn't true).
  • gdb-multiarch. You need the multiarch version because it has every targets enabled includring armv4t which is the one we care about here.
  • GhidraGBA extension (you need to modify extension.properties in the zip to have the version say your ghidra's version (like "10.0.3" or "10.1") so it can be installed).
  • If you want better step over experi
@StanHash
StanHash / multisym.md
Created September 4, 2022 12:11
fe8u name maps
Address clib-2019-03-16.sym idb-2020-07-14.sym fireemblem8.sym fe8-stan.sym feb-2022-09-03.sym
02000000 gAISFrontLeft gAISFrontLeft - - -
02000004 gAISBackLeft gAISBackLeft - - -
02000008 gAISFrontRight gAISFrontRight - - -
0200000C gAISBackRight gAISBackRight - - -
0200005C gpBattleAnimFrameStartLookup gpBattleAnimFrameStartLookup - - -
02000064 gpProcEkrBattle gpProcEkrBattle - - -
02000068 gpProcEkrGauge gpProcEkrGauge - - -
0200006C gpProcEkrDispUP gpProcEkrDispUP - - -