Skip to content

Instantly share code, notes, and snippets.

@ryu10
ryu10 / bacdst-p.asm
Last active July 8, 2022 07:26
Patch to Basic9 Cold Start Routine for SBC6809 Enhanced
* bacdst-p.asm
* Patch to Basic9 Cold Start Routine
*
* Set (TOPRAM) to $77FE
* to save area $7800-$7FFF for Assist09
*
RSTVEC equ $6f
PROGST equ $0217
TXTTAB equ $19
TOPRAM equ $71
@ryu10
ryu10 / test.asm
Created June 26, 2019 00:54
6800 Assembler (as0) test patterns
* test patterns for Motorola m6800-assembly (as0)
*
* symbol defs
val1 equ 254 ; decimal
val2 equ $fe ; hex
val3 equ %11111110 ; binary
val4 equ @376 ; octal
* expressions - there is no provision for parenthesized expressions
val5 equ val2*3 + $04 - $03/@2 % 33 & 0b0101 ~$fe | abc ^ dd ; arithmetic/bit operators
val6 equ $FFF0 ; addresss ref
@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
@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".
* 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 / 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
@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 / 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 / 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 / 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