Skip to content

Instantly share code, notes, and snippets.

/*
PIC18F47Q43 ROM RAM and UART emulation firmware
This single source file contains all code
Target: EMUZ80 - The computer with only Z80 and PIC18F47Q43
Compiler: MPLAB XC8 v2.36
Written by Tetsuya Suzuki
Modified for PIC18F47Q84 by ryu10/RyuStudio
@ryu10
ryu10 / a2pid.c.patch
Last active September 10, 2021 16:49
Suppresses 'Unknown Event' log messages from a2pid of David Schmenk's Apple II Pi https://github.com/dschmenk/apple2pi
--- src/a2pid.c 2021-08-16 01:50:14.596595180 -0700
+++ a2pid.c 2021-08-16 01:51:22.776233603 -0700
@@ -470,6 +470,7 @@
fd_set readset, openset;
char *devtty = deftty;
char *vdrvdir = "/usr/share/a2pi/"; /* default vdrv image directory */
+ char unk_msg[30]; /* for Unknown Event err msg test */
/*
* Parse arguments
@ryu10
ryu10 / ff.cfg
Last active April 3, 2021 01:02
FlashFloppy configuration for DEC VT180
# ff.cfg
interface = ibmpc
pin02 = nc
pin34 = nrdy
write-protect = no
index-suppression = no
# display-type = oled-128x32
@ryu10
ryu10 / dsk2nic.py
Last active June 28, 2023 18:28
dsk2nic - Apple II floppy image format converter, from DSK to NIC
#!/usr/bin/env python3
# dsk2nic - Apple II floppy image format converter, from DSK to NIC
# rename it to po2nic.py to convert from PO to NIC
# or run: ln -s ./dsk2nic.py po2nic.py
__version__ = '0.1'
from optparse import OptionParser
import sys, getopt, re
def main(argv=None):
p = OptionParser(version="ver:%s" % __version__)
@ryu10
ryu10 / main.cpp
Last active July 26, 2020 22:09
Disk II Track Indicator
#include <M5Stack.h>
#if CONFIG_FREERTOS_UNICORE
#define ARDUINO_RUNNING_CORE 0
#else
#define ARDUINO_RUNNING_CORE 1
#endif
const int phasePins[] = {16, 17, 2, 5};
const int enablePin = 26;
@ryu10
ryu10 / main.c
Last active May 26, 2020 06:29
05_Ctr_DMA: main.c
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
@ryu10
ryu10 / asciiart-apu_b1.bas
Last active January 8, 2020 06:01
Modified from MUTIF09Project/Am9511A-AddonBoard/TestProgram/asciiart/
2 CLEAR 300,&H7000 : REM TOP
3 PRINT "LOADING MACHINE CODE..."
4 GOSUB 1000
5 PRINT "FINISHED." : PRINT "INITIALIZING..."
6 EXEC &H7119 : REM INIT
7 PRINT "INIT DONE."
10 FOR Y=0 TO 24
15 POKE &H718A,Y : REM VARY LSB
20 FOR X=0 TO 78
25 POKE &H7186,X : REM VARX LSB
* Am9511A TEST PROGRAM (1-9) FOR MPB6809 MONITOR
*
* make sure to connect RESET pin of Am9511A to PC0 pin of 8255A
*
* PUTCH EQU $F0E6
* GETCH EQU $F0C7
* CONTRL EQU $F13E
* OUT4HS EQU $F0FF
* OUT2HS EQU $F101
INCHP equ 0
@ryu10
ryu10 / nekotb.applescript
Last active October 30, 2019 19:30
# Neko in Touch bar
# Neko in Touch bar
# 1. Convert ICONs from neko DA
# into "icon{abs(iconId)}.png" files,
# and save them under ~/Documents/neko/
# e.g. icon16000.png, icon15999.png, ...
# 2. In BetterTouchTool, create an Applescript Widget.
# 3. On the widget, paste the script below,
# set "Execute script every" 0.3 sec and check "Show only icon"
# 4. On the widget list, right-click on the widget and choose
# "Copy Selected Item UUID".
@ryu10
ryu10 / mandelbrota3.ba3
Last active June 7, 2020 21:03
Apple Business Basic III Mandelbrot set plot (based on https://www.rosettacode.org/wiki/Mandelbrot_set#BASIC256)
100 OPEN #1,".GRAFIX"
110 INVOKE "BGRAF.INV"
120 PERFORM INITGRAFIX
130 PERFORM GRAFIXMODE(%3,%1)
200 PERFORM GRAFIXON
210 PERFORM FILLCOLOR(%0)
220 PERFORM FILLPORT
1000 KT=128:M=4.0:GWIDTH=140:GHEIGHT=192
1010 XMIN=-2.1:XMAX=0.6:YMIN=-1.35:YMAX=1.35
1020 DX=(XMAX-XMIN)/GWIDTH:DY=(YMAX-YMIN)/GHEIGHT