This is slimgem, a minimalist GEM AES/VDI binding designed to be the thinnest possible interface for creating the smallest and fastest GEM binaries you've ever seen.
Need a little excitement? Snap into a slim GEM! OOOOH YEAH!!!!
slimgem is designed for use with Thorsten Otto's MiNT gcc toolchain and libcmini. slimgem can also be used to build for FreeGEM on MS-DOS using Watcom C.
slimgem is implemented as a Single Header Library, simply copy the slimgem/
directory into your own project and include slimgem/gem.h
. See the Makefile
for an example of how to compile using libcmini. You will need to edit or
specify LIBCMINI_DIR
if you don't put it where I do.
slimgem is currently designed to be used only within a single C source.
slimgem is designed to eliminate the numerous layers of faffing about involved in classical GEM bindings, and expects gcc to aggressively inline most, if not all, of an AES/VDI call. Use gcc's optimization flags, -Os for small code, and -Ofast for fast code.
slimgem attempts to be MiNT gemlib compatible, but diverges in the area of the
VDI bindings. Classical VDI bindings pass a VDI handle around to every function,
which amounts to pointlessly re-writing it back to contrl[6]
on every VDI
call. slimgem's revised v_opnvwk()
call returns the handle in the global
contrl[6]
, and simply leaves it there. Refer to open_vwork()
in sample.c
for how to use it. Remove the VDI handle from your code, you probably don't
need it?
If there is a need for multiple VDI handles (GDOS printing?) this will need to be revised.
slimgem is dedicated to the memory of "Macho Man" Randy Savage, 1952-2011
-- Seg <seg@haxxed.com>