add Oidos example

This commit is contained in:
PoroCYon 2019-05-10 23:56:05 +02:00
parent a83a9564fb
commit 764ac935a4
5 changed files with 50 additions and 1 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "v2/fr_public"]
path = v2/fr_public
url = https://github.com/PoroCYon/fr_public
[submodule "oidos/oidos"]
path = oidos/oidos
url = https://gitlab.com/PoroCYon/oidos.git

View File

@ -1,6 +1,6 @@
# Linux templates for PC intro synths
Small template code to get 4klang and V2 running on Linux :)
Small template code to get 4klang, Oidos and V2 running on Linux :)
Quickly hacked together by PoroCYon.
@ -22,6 +22,12 @@ Hugs to Alkama and noby for providing 4klang test tracks!
2. Run `make`
3. Run `bin/runner`
#### Oidos
1. Put the `.xrns` files in the `mus` folder.
2. Run `make`
3. Run `bin/play-<songname> | aplay`
#### V2
1. Put the exported `.v2m` files in the `mus` folder.

3
oidos/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
bin/
obj/
mus/*.xrns

36
oidos/Makefile Normal file
View File

@ -0,0 +1,36 @@
NASM ?= nasm
NASMFLAGS := -DLINUX -felf32 -I obj -I oidos/player/
default: all
%/:
mkdir -p "$@"
obj/%.xrns.asm: mus/%.xrns obj/
oidos/convert/oidosconvert.py "$<" "$@"
obj/play.o: oidos/player/play.c obj/
$(CC) -m32 -c -o "$@" "$<"
obj/random.o: oidos/player/random.asm obj/
$(NASM) $(NASMFLAGS) -o "$@" "$<"
obj/%.xrns.o: obj/%.xrns.asm oidos/player/oidos.asm
cp "$<" "obj/music.asm"
$(NASM) $(NASMFLAGS) -o "$@" oidos/player/oidos.asm
$(RM) "obj/music.asm"
bin/play-%: obj/play.o obj/random.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) -rv obj/
.PHONY: default all clean

1
oidos/oidos Submodule

@ -0,0 +1 @@
Subproject commit c7bc996d17793a17d770a761dcc9bd4e26462205