Initial commit

This commit is contained in:
Neil McPhail 2024-10-21 08:30:19 +00:00
commit 64b7536fd5
7 changed files with 1251 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.tap
sounds/

8
Makefile Normal file
View File

@ -0,0 +1,8 @@
limmysswearingxylophone.tap: loader.tap xylo.tap
cat loader.tap xylo.tap > limmysswearingxylophone.tap
loader.tap: loader.bas
zmakebas -l -a @code -n "limxylo" -o loader.tap loader.bas
xylo.tap: xylo.asm sample.asm
pasmo --tap xylo.asm xylo.tap

19
README.md Normal file
View File

@ -0,0 +1,19 @@
# Limmy's Swearing Xylophone ZX Spectrum Port
This is a simple ZX Spectrum port of [Limmy's Swearing Xylophone](https://daftlimmy.github.io/SwearingXylophone/).
The website and this port are **not safe for work**. You have been warned.
## Files
|File|Purpose|
|----|-----------|
|README.md|This file.|
|Makefile|Run `make` to build the project. It requires `pasmo` and `zmakebas` to be installed on your system and produces the `limmysswearingxylophone.tap` file which can be loaded in a Spectrum emulator.|
|loader.bas|BASIC file which will be converted to a `tap` file by `zmakebas`. It loads the machine code and sets the screen.|
|xylo.asm|Z80 assembler file which reads keystrokes and calls the relevant sample routines.|
|sample.asm|Z80 assembler file created by [BeepFX](https://shiru.untergrund.net/software.shtml) containing the sample player code and sample data. The generated code is given under a permissive licence. It has been hand-edited to remove spurious code.|
|limmy.spj|Project file for BeepFX. The samples were downloaded from Limmy's original site and down-converted with `sox -V3 -D file.mp3 -r 9560 -b 8 -e unsigned -c1 file.wav` before being loaded into the project.|
## Licence
This is just a bit of fun. I made it to explore using sampled sound on a ZX Spectrum. Most of the code is generated by BeepFX, and the original application, design and samples are all Limmy's. Please don't distribute binaries or sell this without permission from the man himself. You can edit the bits which are my code as you wish and distribute that code however you see fit. Patches welcome.

1
limmy.spj Normal file

File diff suppressed because one or more lines are too long

18
loader.bas Normal file
View File

@ -0,0 +1,18 @@
border 0: paper 0: ink 7: bright 1: cls
print at 0,7;"\ .\..\..\..\..\..\..\..\..\..\..\..\..\..\..\..\. "
for i=1 to 15
print at i,7;"\ :\{0x11}\{5} \{0x11}\{6} \{0x11}\{4} \{0x11}\{3} \{0x11}\{1} \{0x11}\{0}\: "
next i
print " \ '\''\''\''\''\''\''\''\''\''\''\''\''\''\''\''\' "
print
print " 1 2 3 4 5"
print
print "https://daftlimmy.github.io/"
print " SwearingXylophone"
randomize usr 51000
@code:
clear 50999
load ""code
run

1140
sample.asm Normal file

File diff suppressed because it is too large Load Diff

63
xylo.asm Normal file
View File

@ -0,0 +1,63 @@
org 51000
zero_counter:
xor a
set_counter:
ld (counter), a
read_keyboard:
ld bc, &f7fe
in a, (c)
srl a
jr nc, key_1
srl a
jr nc, key_2
srl a
jr nc, key_3
srl a
jr nc, key_4
srl a
jr nc, key_5
jr read_keyboard
key_1:
ld a, (counter)
call play
jr inc_counter
key_2:
ld a, (counter)
inc a
call play
jr inc_counter
key_3:
ld a, (counter)
inc a
inc a
call play
jr inc_counter
key_4:
ld a, (counter)
add a, 3
call play
jr inc_counter
key_5:
ld a, (counter)
add a, 4
call play
inc_counter:
ld a, (counter)
add a, 5
cp 25
jr nz, set_counter
jr zero_counter
counter:
defb 0
INCLUDE "sample.asm"