This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// save as demo.c and compile like this: | |
// cl65 -t c64 -O -o demo.prg demo.c | |
#include <stdint.h> | |
#include <cbm.h> | |
#define BSOUT(c) \ | |
__AX__ = c; \ | |
asm("jsr BSOUT"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 O=5:N=10:GOSUB 1000 | |
110 O=5:N=10:GOSUB 1000 | |
120 O=6:N=4:GOSUB 1000 | |
130 O=6:N=4:GOSUB 1000 | |
140 O=6:N=6:GOSUB 1000 | |
150 O=6:N=6:GOSUB 1000 | |
160 O=6:N=4:GOSUB 1000 | |
170 O=6:N=4:GOSUB 1000 | |
900 END | |
1000 REM N = NOTE, O = OCTAVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import argparse | |
# parse arguments | |
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, | |
description='Converts a VGM file to BASIC POKEs.') | |
parser.add_argument('input', help='the input file name') | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 REM RESET SOUND CHIP | |
110 FOR I = 0 TO 255 : POKE $9FE0, I : POKE $9FE1, 0 : NEXT | |
120 REM GONG | |
130 O=5:N=0:C=0:GOSUB 1000 | |
140 O=5:N=9:C=1:GOSUB 1000 | |
150 O=6:N=0:C=2:GOSUB 1000 | |
160 O=6:N=9:C=3:GOSUB 1000 | |
170 REM NOTE OFF FOR ALL 4 CHANNELS | |
180 FOR I = 1 TO 4000:NEXT | |
190 POKE $9FE0, $08 : POKE $9FE1, $00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ym2151 basic player by Barry Yost - sep 25, 2019 | |
// original original tune "Stardust" from C64 game "Lazy Jones" | |
// ported to C by Frank Buss | |
#include <stdint.h> | |
#include <6502.h> | |
struct YM2151_t { | |
uint8_t reg; | |
uint8_t data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Snake, Copyright (c) 2005 Frank Buss <[email protected]> (aka Shine) | |
artworks by Gundrosen | |
coding by Shine | |
background music: "Stranglehold", composed by Jeroen Tel, (C) 1995 Maniacs of Noise | |
]] | |
-- default options | |
options = { speed = 2, level = "desert", music = "on", sound = "on" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# reads a voltage each 10 seconds and prints it | |
# sample output: | |
# | |
# instrument FLUKE,8842A,0,V3.0 | |
# start Sat Oct 5 05:36:48 2019 | |
# | |
# time voltage | |
# 0 4.191300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Copyright (c) 2019, Frank Buss | |
# All rights reserved. | |
# based on a PHP script by Barry Yost | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# 1. Redistributions of source code must retain the above copyright notice, this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Game of Life implementation for Commander X16 | |
; Copyright 2019 by Frank Buss | |
; | |
; compile with CC65 like this: | |
; cl65 --cpu 65c02 -t none -o gameoflife.prg gameoflife.s | |
VERA_ADDR_LO = $9f20 | |
VERA_ADDR_MID = $9f21 | |
VERA_ADDR_HI = $9f22 | |
VERA_DATA0 = $9f23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cpu/instructions.h b/cpu/instructions.h | |
index 09757cc..38dd1f1 100644 | |
--- a/cpu/instructions.h | |
+++ b/cpu/instructions.h | |
@@ -505,3 +505,14 @@ static void tya() { | |
zerocalc(a); | |
signcalc(a); | |
} | |
+ | |
+#include <inttypes.h> |
OlderNewer