Commit 863e07e5 authored by PoroCYon's avatar PoroCYon
Browse files

add clinkster player code

parent 86e6cfbd
# Linux templates for PC intro synths
Small template code to get 4klang, Oidos and V2 running on Linux :)
Small template code to get 4klang, Clinkster, Oidos and V2 running on Linux :)
Quickly hacked together by PoroCYon.
......@@ -14,6 +14,7 @@ Planet](
* A C compiler, make, sed, awk
* nasm or yasm
* Python **2**, for the converters used in Clinkster and Oidos.
### Usage
......@@ -24,6 +25,12 @@ Planet](
2. Run `make`
3. Run `bin/runner`
#### Clinkster
1. Put the `.xrns` files in the `mus` folder.
2. Run `make`
3. Run `bin/play-<songname> | aplay`
#### Oidos
1. Put the `.xrns` files in the `mus` folder.
NASM ?= nasm
NASMFLAGS := -DLINUX -felf32 -I Clinkster/player/ -I obj/
default: all
mkdir -p "$@"
obj/play.o: src/play.c obj/
$(CC) -I Clinkster/player/ -m32 -c -o "$@" "$<"
obj/%.xrns.asm: mus/%.xrns obj/
Clinkster/converter/ "$<" "$@"
obj/%.xrns.o: obj/%.xrns.asm Clinkster/player/clinkster.asm obj/
cp "$<" obj/music.asm
$(NASM) $(NASMFLAGS) -o "$@" "Clinkster/player/clinkster.asm"
$(RM) obj/music.asm
bin/play-%: obj/play.o obj/%.xrns.o bin/
$(CC) -m32 -o "$@" $(filter-out bin/,$^)
INFILES := $(wildcard mus/*.xrns)
OUTFILES := $(patsubst mus/%.xrns,bin/play-%,$(INFILES))
all: $(OUTFILES)
$(RM) -vr bin/ obj/
.PHONY: deafult all clean
#include <unistd.h>
#include "clinkster.h"
int main() {
write(STDOUT_FILENO, Clinkster_WavFileHeader, sizeof(Clinkster_WavFileHeader));
write(STDOUT_FILENO, Clinkster_MusicBuffer, Clinkster_WavFileHeader[10]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment