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
/* | |
See https://gitlab.com/nedopc/npc5/blob/master/emu-rv32i.c for the latest version, with more features and less bugs :-) | |
RISCV emulator for the RV32I architecture | |
based on TinyEMU by Fabrice Bellard, see https://bellard.org/tinyemu/ | |
stripped down for RV32I only, all "gotos" removed, and fixed some bugs for the compliance test | |
by Frank Buss, 2018 | |
Requires libelf-dev: |
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 | |
# play a sequence of beeps | |
# based on https://stackoverflow.com/a/27978895/3210924 | |
import pyaudio | |
import numpy as np | |
from numpy import zeros | |
import sys | |
import time |
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 | |
# In your SVG file you can add circles as placeholders for knobs and ports | |
# for each circle, add a property description text like this: | |
# | |
# name KNOB1 | |
# ofs -4.75 -100.6 | |
# | |
# This will create a header file entry like 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
; comppile with ACME (https://sourceforge.net/projects/acme-crossass/ ) | |
; acme -f cbm -o test.prg test.asm | |
; | |
; then start in the emulator: | |
; x16emu -run test.prg | |
*=$0801 | |
!byte $0b,$08,$01,$00,$9e,$32,$30,$36,$31,$00,$00,$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
VPOKE4,0,33 | |
MON | |
A0400 SEI | |
LDA #$04 | |
STA $9F20 | |
LDA #$02 | |
STA $9F21 | |
LDA #$00 | |
STA $9F22 | |
STA $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
10 REM ADDRESS 12:5 | |
20 VPOKE 4, $800, 0 | |
30 REM ADDRESS 16:13 (STARTING AT $10000) AND 8 BPP MODE | |
40 VPOKE 4, $801, $88 | |
50 REM X COORDINATE 7:0 | |
60 VPOKE 4, $802, 220 | |
70 REM X COORDINATE 9:8 | |
80 VPOKE 4, $803, 0 | |
90 REM Y COORDINATE 7:0 | |
100 VPOKE 4, $804, 55 |
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 pyaudio | |
import numpy as np | |
import sys | |
import time | |
import math | |
p = pyaudio.PyAudio() |
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
-- max buffer length in seconds | |
length = 10 | |
addLabel(50, 125, "Input", 20) | |
addLabel(50, 165, "Trigger", 20) | |
addLabel(50, 205, "Delay", 20) | |
addLabel(190, 125, "Output", 20) | |
input = addInput(20, 120) | |
trigger = addInput(20, 160) | |
delay = addInput(20, 200) |
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
class PinOut { | |
public: | |
PinOut(uint8_t pin): m_pin(pin) { | |
pinMode(pin, OUTPUT); | |
} | |
PinOut& operator= (uint8_t state) { | |
digitalWrite(m_pin, state ? HIGH : LOW); | |
return *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
// set these fuse bits to 0: | |
// CKDIV8, SUT0, CKSEL3, CKSEL2, and CKSEL0 | |
// the CPU clock is 31250 Hz | |
#define F_CPU 31250 | |
#include <avr/io.h> | |
#include <avr/power.h> | |
#include <util/delay.h> |
NewerOlder