Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public void test(int ID)
{
System.Type types = {
typeof(Integer),
@Frank-Buss
Frank-Buss / test.cpp
Last active February 24, 2020 11:17
floating point tests with NTL lib
/*
To comppile it on Debian, first install the package libntl-dev:
sudo apt-get install libntl-dev
then you can compile and run it like this:
g++ test.cpp -lntl -o test ; ./test
output on my system:
mandelbrot calculation at point (-0.025, 0.643265)
#!/usr/bin/env python3
# This file is Copyright (c) 2019 Antti Lukats <[email protected]>
# This file is Copyright (c) 2019 msloniewski <[email protected]>
# License: BSD
import argparse
from migen import *
@Frank-Buss
Frank-Buss / counter.diff
Created November 25, 2019 23:33
cycle counter hack for X16 emulator
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>
@Frank-Buss
Frank-Buss / gameoflife.s
Created November 23, 2019 03:31
Game of Life implementation for Commander X16
; 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
@Frank-Buss
Frank-Buss / dmp2c.py
Last active October 25, 2019 11:43
converts a DefleMask DMP instrument file to a C array or binary file
#!/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
@Frank-Buss
Frank-Buss / logging.py
Created October 5, 2019 03:46
GPIB voltage logging with a Fluke 8842A
#!/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
@Frank-Buss
Frank-Buss / snake.lua
Created September 26, 2019 11:13
Lua Player snake game
--[[
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" }
@Frank-Buss
Frank-Buss / stardust.c
Created September 26, 2019 05:16
Commander X16 YM2151 player
// 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;
@Frank-Buss
Frank-Buss / gong.bas
Created September 25, 2019 05:09
4 tone gong on the Commander X16
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