add clinkster player code
This commit is contained in:
parent
86e6cfbd96
commit
863e07e575
|
@ -1 +1,3 @@
|
||||||
*.o
|
*.o
|
||||||
|
*.pyc
|
||||||
|
__pycache__/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# 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/).
|
||||||
|
|
||||||
* 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/).
|
||||||
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.
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
bin/
|
||||||
|
obj/
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
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
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
*.xrns
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
#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]);
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
bin/
|
bin/
|
||||||
obj/
|
obj/
|
||||||
mus/*.xrns
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
*.xrns
|
Loading…
Reference in New Issue