Skip to content

Instantly share code, notes, and snippets.

@ninjadynamics
ninjadynamics / REPORT.md
Created June 26, 2026 11:45
dcload-ip fork

dcload-ip Fork Report: Nonblocking Console and Reliable Reset

This report summarizes the local HyperSolar fork of dcload-ip under lib/dreamcast/dcload-ip. It is written for Dreamcast homebrew maintainers who want to understand what changed, why it changed, and which parts are good candidates for upstream discussion.

The short version: compared with upstream dcload-ip, this fork makes Dreamcast printf traffic safe for frame-time-sensitive programs. Upstream console writes are synchronous: the Dreamcast sends a write request and waits in bb->loop()

#!/usr/bin/env bash
set -euo pipefail
# install-git-checkpoint.sh
#
# Installs a global Git alias:
#
# git checkpoint "message"
# git checkpoint list
# git checkpoint apply
@ninjadynamics
ninjadynamics / REPORT.md
Created June 21, 2026 11:16
SH4ZAM Integration Report

HyperSolar — SH4ZAM Math Upgrade Report

Date: 2026-06-21 Target: Dreamcast (SH4) Result: ~2 ms / ~18% off the 8-enemy wave-load frame on real hardware (~11 ms → ~9 ms render time). Validated visually + by timing on a real Dreamcast.

This upgrade replaces KOS matrix math with SH4ZAM across the Dreamcast rendering stack (GLdc + raylib) and adds an FTRV-batched player-lighting pass. All SH4ZAM lives in the library layer; the game itself stays -std=c99 and SH4ZAM-free, getting the acceleration transparently.


@ninjadynamics
ninjadynamics / REPORT.md
Created June 19, 2026 19:20
Dreamcast forks

Dreamcast Fork Change Report: raylib-dc, GLdc, and dcmesh

This report summarizes the local Dreamcast rendering/tooling fork work since the recorded clone baselines. It is written for maintainers of the Dreamcast raylib/GLdc ecosystem who need to understand what changed, why it changed, and which parts are broadly reusable versus downstream integration glue.

The short version: the forks move the Dreamcast path away from many tiny immediate-mode helper submissions and toward fewer, larger, state-coherent array submissions that GLdc can process through its fastest paths. A small offline mesh format (.dcmesh) was added to pre-stripify static model geometry. GLdc was instrumented and tuned around the same fast path assumptions. SH4ZAM support exists, but the TODO plan correctly treats it as incomplete and in need of a staged follow-up.

Executive Summary

The Dreamcast rendering stack used here is:

@ninjadynamics
ninjadynamics / REPORT.md
Created June 19, 2026 07:49
PS2SDK forks

ps2gl and ps2stuff Fork Delta Report

This report summarizes the local deltas in two PS2 library forks and explains the technical reason each change exists. The intended audience is maintainers of the PS2 SDK ecosystem, especially ps2gl and ps2stuff.

The downstream project using these forks is HyperSolar, but the library changes below are described in library terms. Game-specific details are included only where they explain an observed requirement or a compatibility constraint.

High-Level Summary

Two nested forks were reviewed:

@ninjadynamics
ninjadynamics / soccer.c
Created January 15, 2026 17:44
Vibe Soccer (by Claude Opus 4.5)
// Soccer Game - CPU vs CPU with Strategic AI
// Compile: gcc soccer.c -o soccer -lraylib -lm
#include "raylib.h"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define SCREEN_WIDTH 1360
@ninjadynamics
ninjadynamics / Supermodel.ini
Created December 29, 2025 15:37
Supermodel 3 Configuration (4K / DualSense)
;
; Supermodel Configuration File
;
[ Global ]
New3DEngine =1
QuadRendering =0
WideScreen =1
@ninjadynamics
ninjadynamics / ReShadePreset.ini
Created August 26, 2025 07:38
CRT-Royale Preset for Ninja Gaiden Ragebound 4K
Techniques=CRT_Royale@crt-royale.fx
[crt-royale.fx]
aa_subpixel_r_offset_runtime=-0.333333,0.000000
basic_setup_help=0
beam_shape_mode=2
bloom_excess=0.000000
bloom_underestimate_levels=0.800000
blur_radius=1.000000
border_compress=2.500000
@ninjadynamics
ninjadynamics / chat.c
Created October 3, 2024 14:57
LlamaCPP Chat Inference in C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h> // For INFINITY
#include "llama.h"
#define MODEL_PATH "llama-3.2-1b-instruct-q8_0.gguf"
@ninjadynamics
ninjadynamics / carsim.c
Last active June 12, 2024 14:15
Drag Racing Simulator (raylib)
/*
MIT License
Copyright (c) Ninja Dynamics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is