The Brain Dump
https://floooh.github.io/ (RSS)
In a couple of days I will merge the next breaking sokol_gfx.h update (aka the “Bindings Cleanup”). The update also affects sokol-shdc, so if you’re using sokol-shdc for shader compilation make sure to update that as well. Overview Updated documentation and example code When using sokol-shdc: When not using...
Some quick Zig feedback in the context of a new 8-bit emulator project I started a little while ago: https://github.com/floooh/chipz Currently the project consists of: a cycle-stepped Z80 CPU emulator (similar to the emulator described here: https://floooh.github.io/2021/12/17/cycle-stepped-z80.html chip emulators for Z80 PIO, Z80 CTC and...
Aka: “the storage buffer update” In a couple of days I will merge the next sokol-gfx feature update which adds initial storage buffer support. The update also affects other headers and tools (most notably sokol_app.h, all headers with embedded shaders, and sokol-shdc - the cross-backend shader compiler). The bad news first: This is...
In a couple of days I will merge the first big API update of 2024 for sokol_gfx.h (with some related changes in sokol_app.h, sokol_glue.h and sokol_gfx_imgui.h). NOTE: most links to code examples will only point to the right code after PR #985 has been merged! The API update in sokol_gfx.h is a BREAKING CHANGE for all code, but for most use...
I did a neat little thing during my year-end vacation: A VSCode extension for retro-assembly coding with the assembler and home computer emulator integrated right into VSCode via WASM and WASI. The extension is here (careful: it must be installed as pre-release, otherwise installing a dependency extension won’t work, more on that later):...
TL;DR: glueing together VSCode, Cmake and the Emscripten SDK to enable an IDE-like workflow (including debugging). This is written from the perspective of a UNIX-like OS (macOS or Linux), but should also work on Windows with some minor tweaks. Prerequisites First make sure that the following tools are in the path: git cmake ninja You’ll...
In a couple of days I will merge the new WebGPU backend in sokol_gfx.h, and instead of an oversized changelog entry I guess it’s time for a new blog post instead (the changelog entry will have all the technical details too, but here I want to go a bit beyond that and also talk about the design decisions, what went well and didn’t and what to...
Table of Content Table of Content Intro A Code Sample Basic Implementation Ideas Code Generation The Shared Opcode Fetch Machine Cycle The Opcode Lookup Tables The 3 Tick Function Epilogues More on Wait Cycles Instructions with Variable Timing The ‘Overlapped Clock Cycle’ in more Detail DD/FD Prefix Handling ED Prefix...
TL;DR: a detailed look at Z80 instruction timings with the help of a Z80 netlist simulation. Table of Content Table of Content Intro The shape of Z80 instructions General Instruction Timing M-cycles and T-states Opcode Fetch Machine Cycles Memory Read Machine Cycles Memory Write Machine Cycles IO Read...
In a few days I will merge the next API-breaking update for the sokol headers. In general I try to keep such breaking updates to a minimum (at most two or three a year), that’s also why the changes in this merge will be a bit bigger than usual. Since I was going to break compatibility anyway, I added a few more changes that I had been collecting...
I got caught up in a nice little rabbit-hole in the past few weeks after discovering a clang feature that I wasn’t aware of before: Automatically generating language bindings for the Sokol headers from an AST (Abstract Syntax Tree) dumped via clang. I’ve created a little proof-of-concept with Zig as target language (which admittedly is a bit of...