Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Programming is for AIs. Let's go shopping.

tomaes

💭
Programming is for AIs. Let's go shopping.
View GitHub Profile
@tomaes
tomaes / senso.bas
Last active Apr 4, 2021
Senso's Telephone for the BBC Micro. BASIC 10 liner contest entry: https://gkanold.wixsite.com/homeputerium/rules2021
View senso.bas
0REM "MR.SENSO IS A PECULIAR MAN. HIS PHONE NUMBER IS MADE OF"
1REM "1S AND 0S ONLY. PLEASE MEMORIZE HIS NUMBER. HE WOULD APPRECIATE IT."
2DIMA(19):L=0:E=0:BRK=0:MODE7:PRINTTAB(0,12)"SENSO'S TELEPH0NE":H$=INKEY$(249)
3K=48:REPEAT:L=L+1:A(L)=K+(RND(2)-1):IFL>1THENPRINT" NICE!":H$=INKEY$(89)
4CLS:PRINTTAB(0,12)"LISTEN "CHR$(93);:FORI=1TOL:PRINTCHR$(A(I));:T0M=&2A
5SOUND1,-9,129+(A(I)-K)*K,4:H$=INKEY$(89):NEXT:H$=INKEY$(99):PRINTTAB(0,12);
6PRINTSPC(35)TAB(0,12)"NOW, REPEAT ";CHR$(93);:FORI=1TOL:A$=GET$:PRINTA$;
7IFA$<>CHR$(A(I))THENBRK=1:E=E+1:SOUND1,-9,5,6ELSESOUND1,-9,109+(A(I)-K)*K,4
8NEXT:H$=INKEY$(89):UNTILBRK OR L=19:PRINT:PRINTTAB(0,12)"ROUNDS:";L;"/19 ";
9PRINT"TYPOS:";E;SPC(15):IFL<19THENPRINT"GO AGAIN!"ELSEPRINT"MR.SENSO APPR0VES"
@tomaes
tomaes / m-thh-ste.bas
Last active Mar 25, 2021
BBC micro test game; random 2nd grader arithmetic at devilish velocity.
View m-thh-ste.bas
AUTO 10, 10
REM MICRO GAME FOR THE BBC MICRO
MODE 7
PRINT CHR$(141); CHR$(134); "MATH HASTE": REM 2X HEIGHT (top), cyan
PRINT CHR$(141); CHR$(130); "METH HESTE": REM 2X HEIGHT (bottom), green
DIM Q(6): DIM Q$(6): D = 2: R = 0
@tomaes
tomaes / drumbit.json
Last active Mar 9, 2021
drumbit.app pattern and beat collection
View drumbit.json
{"name":"drumbit","metadata":{"author":"tomaes","title":"hectic","remarks":""},"options":{"tempo":160,"swing":0,"kit":"11","effect":{"id":"6","level":0.5},"compressor":{"bypass":1,"threshold":-20,"ratio":4,"attack":0.0010000000474974513,"release":0.25,"knee":5},"lowpass":{"bypass":1,"frequency":800,"q":1},"highpass":{"bypass":1,"frequency":800,"q":1}},"pattern1":{"track1":{"vol":1,"pan":1,"pitch":2,"steps":[0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0]},"track2":{"vol":0.9,"pan":1,"pitch":2,"steps":[0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0]},"track3":{"vol":0.7,"pan":1,"pitch":0.8,"steps":[0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0]},"track4":{"vol":1,"pan":1,"pitch":2,"steps":[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1]},"track5":{"vol":1,"pan":1,"pitch":1.9,"steps":[0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0]},"track6":{"vol":1,"pan":1,"pitch":1,"steps":[1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0]},"track7":{"vol":1,"pan":1,"pitch":0.7,"steps":[0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0]},"track8":{"vol":1,"pan":1,"pitch":1.4,"steps":[0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0]}},"pattern2":{"
@tomaes
tomaes / jenbeats.txt
Last active Mar 6, 2021
"Spinning Jenny" Jams (c64 drum computer tool tabs)
View jenbeats.txt
Kit #1 (standard), tempo E000
F1 C-761-AAC-7-1-A-C-761-AAC-7-1-A-
: : : : : : : :
F3 12118-19-CC-1-B-9---4--21-B2C---
: : : : : : : :
F5 7-CB2-1-7-B-2-1-7-B-2---7-B-2---
: : : : : : : :
F7 1AB21-454-1-5-1-1-5B1-454-1-5B1-
@tomaes
tomaes / whatletteristhateven.bas
Last active Jun 26, 2020
Decipher the mangled multicolor mode letters and react quickly. 50+ rounds for the ending. Part memory game, part reaction game in 3 lines of CBM Basic v3.5+ (Commodore 128/+4)
View whatletteristhateven.bas
0 graphic3,1:m=999:do:c$=chr$(rnd(1)*26+65):char,rnd(1)*40,rnd(1)*25,c$:s=s+t*r
1 r=r+1:t=400-r*5:do:geta$:t=t-1:s=s+(a$<>c$)*m-(a$="")*m:loopwhilea$<>c$andt>.
2 loopwhilea$=c$:graphic.,1:print"#"r"score:"s"letter:"c$:ifr>49thenprint"wow!"
@tomaes
tomaes / sidtest.comal
Last active Jun 21, 2020
SID sounds test tool (verbose), written in COMAL-80
View sidtest.comal
auto 100,4
// SID test mini
// in COMAL-80
// ----------
// procedures
// ----------
proc wait(count)
@tomaes
tomaes / colaconvert.bas
Last active Jun 12, 2020
Filters and converts Petscii Cola data to chr$() codes when exported to BASIC.
View colaconvert.bas
0 rem petscii cola chr$() filter/converter stub code
1 print "wait.": n=999: f=32: dim d(1000), cc(1000)
2 for i=0 to n: read a: d(i)=a: next: i=-1
3 i=i+1: on -(d(i)=f) goto 3: s=i: i=1000
4 i=i-1: on -(d(i)=f) goto 4: e=i
5 print "start:"s;"end:"e: print "ok. converting data": j=0
6 for i=s to e: re=0
7 : if d(i) >= 128 then re=1: d(i)=d(i)-128
8 : if d(i) < 32 then cc(j) = d(i)+64
9 : if d(i) <= 63 and d(i) >= 32 then cc(j) = d(i)
@tomaes
tomaes / lasercannon.bas
Last active Jun 9, 2020
My first game with "graphics" (ca. 1993, on C64) remade. Commodore Basic v2 + "Hires-Master" extension. (v2.6)
View lasercannon.bas
0 if peek(51300)<>83 then print "hires-master v1.0 required!": stop
1 j=56320
2 s=53280: si=54272
3 jl=123: jr=119: ju=126: jd=125
5 jx=127: jf=111: lx=319: ly=199
7 mx=160: my=100: lv=1: cn=1
9 r=26 : q=10 : bx=30
11 dim y(200): n$=chr$(13)
12 :::
14 poke s,0: poke s+1,0
@tomaes
tomaes / countrypop.plus4.bas
Last active Dec 4, 2020
A population quiz game in moreorless.io style (Commodore Plus/4 version)
View countrypop.plus4.bas
0 rem _,/'%%&&&&&&&&&&&&&&&&&%%'\__
1 rem ((_country pop plus/4 version_))
2 rem \_\%%%%%%%%%%%%%%%%%%%%%%%/_/
7 : :
8 : v$ = "v1.2f, May/June 2020" :
9 : :
10 rem init '''''''''''''''''''''';
11 vol 5: n=20
12 dim c$(n),c(n),hi$(6),di(6)
13 dim ac$(n),ao$(n),ap(n),aa(n)
@tomaes
tomaes / nnjblitz.pas
Last active May 22, 2020
16-bit DOS game. Download binary from https://tomaes.itch.io/ninja-blitz
View nnjblitz.pas
{
Ninja Blitz
A spin on city bomber games
for 1980s era 16 bit DOS PCs
designed & written by
Thomas "tomaes" Gruetzmacher
in May 2020