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

add clinkster player code

parent 86e6cfbd
*.o *.o
*.pyc
__pycache__/
# Linux templates for PC intro synths # 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. Quickly hacked together by PoroCYon.
...@@ -14,6 +14,7 @@ Planet](https://demozoo.org/productions/172416/). ...@@ -14,6 +14,7 @@ Planet](https://demozoo.org/productions/172416/).
* A C compiler, make, sed, awk * A C compiler, make, sed, awk
* nasm or yasm * nasm or yasm
* Python **2**, for the converters used in Clinkster and Oidos.
### Usage ### Usage
...@@ -24,6 +25,12 @@ Planet](https://demozoo.org/productions/172416/). ...@@ -24,6 +25,12 @@ Planet](https://demozoo.org/productions/172416/).
2. Run `make` 2. Run `make`
3. Run `bin/runner` 3. Run `bin/runner`
#### Clinkster
1. Put the `.xrns` files in the `mus` folder.
2. Run `make`
3. Run `bin/play-<songname> | aplay`
#### Oidos #### Oidos
1. Put the `.xrns` files in the `mus` folder. 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/renoiseconvert.py "$<" "$@"
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)
clean:
$(RM) -vr bin/ obj/
.PHONY: deafult all clean
#include <unistd.h>
#include "clinkster.h"
int main() {
Clinkster_GenerateMusic();
write(STDOUT_FILENO, Clinkster_WavFileHeader, sizeof(Clinkster_WavFileHeader));
write(STDOUT_FILENO, Clinkster_MusicBuffer, Clinkster_WavFileHeader[10]);
}
bin/ bin/
obj/ obj/
mus/*.xrns
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