
C64-Switchless Quad Kernal Switcher
bwack/C64-Switchless-Multi-Kernal-27C256-adapter
Kernal switcher for the C64/C64C/C128

Keyboard reset for Spectravideo MSX SVI-728
Svi728reset is an open-source printed circuit board by arttu76, from the arttu76/svi728keyboardreset repository on GitHub. It is a 2-layer board of 48 × 42 mm with 12 parts on 13 nets, routed with 36 tracks and 0 vias.
It is built around the ATTINY85-20PU. Its parts include 7 resistors, 1 capacitor, 1 IC and 1 connector. It belongs with the retro computing and games and keyboards and input boards and the AVR (ATmega, ATtiny) boards of this library.
Adds a soft reset to the Spectravideo SVI-728 MSX1 home computer (which has no reset button): holding GRAPH + CODE + ESC for ~0.3 s fires a machine-wide reset (the ATtiny pulses power-on-reset transistor T4's base, so the cartridge slot — e.g. a Carnivore2 — resets too, exactly like power-on). An ATtiny85 reads the combo from the machine's own keyboard scan, and strobes the matrix itself only for rows the machine isn't scanning — so the combo works no matter what the running software does with the keyboard: games with their own scan routines that poll only the rows they need, programs that never read the keyboard at all, and even a machine hard-crashed with interrupts disabled. No MSX software is modified and normal keyboard operation is completely unaffected. And if you ever want it gone: holding ESC alone for ~10 s disables the mod entirely (machine resets once, then behaves as unmodified) until the next power-on — see section 2.
The firmware source (main.c) and Makefile accompany this document.
main.c contains a long header comment explaining the whole theory of
operation — read it before installing. The hardware/ directory holds a
KiCad project for the mod board, with Gerbers ready to upload to a PCB
house — see section 1.1.
There are two ways to build the mod — order the PCB (section 1.1) or wire it on perfboard (section 1.2). These components are the same either way:
Then, depending on which way you build it:
| Also need | Why | |
|---|---|---|
| Ordered PCB (1.1) | nothing else | the parts drop straight in and every pad is labelled |
| Perfboard (1.2) | a scrap of perfboard, and more thin wire | the parts have to be joined point-to-point by hand as well |
All parts are shown with their exact positions in section 5. The series resistors are protection only: all four sense pins are inputs, so they drop nothing in normal use — but the reset line must stay 100 Ω (it actively drives T4's base and limits the C112 surge).
hardware/ is a KiCad project for a small board that holds all of the
components above: 48 × 42 mm, two layers, every part through-hole, and seven
labelled solder pads for the flying wires to the machine.

Both sides of the board. Two layers are used: the three keyboard sense lines run on the component side, and X4, RST and +5 V run on the solder side to reach the far row of socket pins.
| File | What it is |
|---|---|
hardware/svi728reset.kicad_pro | The KiCad project — open this one |
hardware/svi728reset.kicad_sch | Schematic (KiCad 9/10) |
hardware/svi728reset.kicad_pcb | Board layout |
hardware/gerbers/svi728reset-gerbers.zip | Upload this to order bare boards |
hardware/bom.csv | Bill of materials |
hardware/svi728reset-pos.csv | Pick-and-place / centroid file, for assembly quotes |
docs/schematic.pdf | Printable schematic — the one to have on the bench |
Ordering bare boards. Upload svi728reset-gerbers.zip to PCBWay (or
JLCPCB, Aisler, OSH Park — the archive is plain RS-274X plus Excellon
drill). Every option can stay at its default: 2 layers, 48 × 42 mm, 1.6 mm
FR-4, 1 oz copper, HASL, any solder-mask colour. Minimum order is 5 boards
and they cost a few euros for the batch. Then solder the parts on by hand —
it is nine through-hole parts and takes about ten minutes.
Ordering it assembled. bom.csv and svi728reset-pos.csv are what an
assembly service asks for, so PCBWay's turnkey assembly can quote the board.
Two things to know before you do:
bom.csv marks the
ATtiny as not-for-assembly for exactly this reason.bom.csv are
suggestions; any equivalent part the assembler already stocks is fine.
Hand assembly of through-hole parts is also usually the more expensive
option, so for one board it is normally cheaper to solder it yourself.No PCB needed. The circuit is small enough that a scrap of perfboard and the schematic in section 5 work just as well — that is how the prototype was built. On top of the components listed above you need the perfboard itself and enough thin wire to join the parts to each other point-to-point, as well as the seven wires out to the machine.
Two things the PCB does for you that you have to remember by hand here: the 100 nF capacitor goes right at the socket, across pins 8 and 4, and the two 10 kΩ pull-ups tie to the ATtiny side of the 100 Ω series resistors (i.e. to pin 8), not to the machine side.
Open hardware/svi728reset.kicad_pro in KiCad 9 or 10. To rebuild the
manufacturing outputs after a change:
cd hardware
kicad-cli sch erc svi728reset.kicad_sch
kicad-cli pcb drc --schematic-parity svi728reset.kicad_pcb
kicad-cli pcb export gerbers --no-protel-ext --subtract-soldermask --output gerbers/ \
--layers F.Cu,B.Cu,F.Mask,B.Mask,F.SilkS,B.SilkS,Edge.Cuts svi728reset.kicad_pcb
kicad-cli pcb export drill --format excellon --drill-origin absolute \
--excellon-units mm --excellon-separate-th --output gerbers/ svi728reset.kicad_pcb
(cd gerbers && zip -j svi728reset-gerbers.zip *.gbr *.drl *.gbrjob && rm -f *.gbr *.drl *.gbrjob)
kicad-cli pcb export pos --format csv --units mm --side both \
--use-drill-file-origin -o svi728reset-pos.csv svi728reset.kicad_pcb
kicad-cli sch export pdf --black-and-white -o ../docs/schematic.pdf svi728reset.kicad_sch
kicad-cli sch export svg --black-and-white -o /tmp/sch svi728reset.kicad_sch
rsvg-convert --background-color=white -w 2600 /tmp/sch/svi728reset.svg -o ../docs/schematic.png
kicad-cli pcb render --side top --width 1400 --height 1250 --quality high \
--background opaque -o ../docs/pcb-3d.png svi728reset.kicad_pcbERC and DRC are expected to come back clean. The only messages a headless
kicad-cli run emits are lib_symbol_issues / lib_footprint_issues
warnings, which just mean the CLI has no library table configured; they do
not appear when the project is opened in KiCad. The PNGs must be flattened
onto white — a transparent background renders as black-on-black in GitHub's
dark mode.
Design points worth knowing before you change anything:
U1 is a socket footprint, not a soldered-down chip — the ATtiny is
programmed out of circuit (section 4) and inserted afterwards.J1 is square, and pin 1 of the socket is marked on the
silkscreen along with the package notch.svi728reset-pos.csv is in positive millimetres from that corner.svi728reset.pretty/ holds the one project-specific footprint, the seven
labelled wire pads. fp-lib-table is what makes KiCad find it.See main.c. Summary of the verified design (full details in the file header):
PORTB bits 0, 1 and 4 are never set
(instruction-audited) — no pin ever drives a line high, and the firmware
coexists safely with the SVI-728's own circuits.Carnivore2 note: the combo contains ESC, which the C2 boot menu reads as "exit to CF/DOS boot" and which aborts its auto-start countdown. Harmless in practice (the keys are released seconds before the menu polls), but it is the first suspect if C2 auto-start ever mysteriously skips. The emulated FMPAC SRAM survives this reset (it is lost only at power-off).
Four non-obvious firmware rules (do not remove — each cost hours to find):
main() disables the watchdog first thing (MCUSR = 0; wdt_disable();).
A left-on watchdog resets the chip every ~16 ms, so any delay never
finishes and the chip looks dead — and an internal reset shows nothing
on the /RESET pin or VCC, so it's brutal to diagnose.
The firmware uses a hand-written single-byte delay, not _delay_ms.
_delay_ms compiles to a multi-byte down-counter (subi/sbci) that the
ATtiny85 sample used here executes incorrectly (it hangs). Single-byte
dec/brne delays run fine; the build is checked to contain zero sbci.
If you fit a chip that does run _delay_ms correctly, the code still
works as-is — the register delay is portable.
The ATtiny's own strobes are kept out of the machine-scan detector by
zeroing PCMSK for the duration of the strobe — NOT by clearing PCIF
afterwards. An interrupt that pends while interrupts are disabled still
fires after sei() even if you clear the flag first (simavr models
this; it fakes a "machine scan" and breaks the active fallback).
An unpaired half-scan (Y6 seen but not Y7, or vice versa) is dropped after ~150 ms and can then never pair. The window must be wide enough for mixed mode (a passive half from the machine's scan pairing with an active half strobed up to one scan period later) but bounded, or a stale row-6 sample could pair with a row-7 sample taken seconds later and sequential presses (GRAPH+CODE, release, then ESC) would latch as the combo — the exact false-trigger bug the very first detector had.
Hold ESC alone for ~10 seconds at the BASIC prompt or in any menu (the machine must be running normally — it is the machine's own keyboard scan the ATtiny listens to for this). The machine then resets one final time — that reboot is your confirmation — and the ATtiny goes fully inert: interrupts off, every pin high-impedance, pull-ups off, CPU in power-down sleep. The computer behaves exactly as if the mod were not installed, until the next power cycle re-arms it.
Use it when some game or program seems to misbehave with the mod installed: disable, load the program again, compare — no screwdriver required. It is also the zero-risk opt-out if you are hesitant about installing the mod at all: whatever happens, ten seconds of ESC gives you your stock machine back for the rest of the session.
Two deliberate properties: a crashed machine cannot be disarmed (the 10 s of ESC must be observed in the machine's own scan, which a hung machine no longer performs) — so mashing ESC after a crash can never kill the reset combo just before you need it; and GRAPH or CODE touched at any point restarts the 10 s countdown, so holding the reset combo never disarms.
You can skip compiling entirely: the repository's main.hex (and the
matching main.elf the simulator runs) is the exact build that passed the
full simulation and was verified on real hardware — flash it as-is per
section 4; the only tool you need is avrdude (plus an Arduino). Compile
yourself only if you change main.c — and then run the simulator before
flashing.
sudo apt update
sudo apt install gcc-avr avr-libc binutils-avr make
# for programming via Arduino-as-ISP (see section 4):
sudo apt install avrdudePut main.c and Makefile in one directory, then:
make # produces main.hex (this is what you burn)
make size # sanity check: ~930 bytes flash, 4 bytes RAMBefore flashing ANY firmware change, validate it in the simulator (needs the simavr development package):
gcc -O2 -Wall -I/usr/include/simavr sim_harness.c -lsimavr -o sim_harness
./sim_harness main.elf # must print *** PASS ***The harness replays the measured SVI-728 keyboard waveforms through a
25-phase scenario: partial combos; full combo with the machine running;
machine hung with its scan stopped (including a phase with a row parked
low, as a real hung 7445 leaves it — must NOT fire on the resulting
2-of-3 phantom); a 2 ms "edge storm"; single-row machines (polling only
Y7 or only Y6 — the firmware must strobe only the other row and the
combo must still fire); and the ESC-hold kill switch (~10 s hold → one
final reset, then provably inert: the simulated CPU must halt in
power-down sleep with every pin high-Z, and a combo afterwards — even
with the machine hung — must do nothing). It asserts per phase and per
row that the firmware strobes only rows the machine isn't covering (with
the ~1 s hold-off), that each reset pulse is 150–250 ms wide, plus the
safety invariants on every instruction: PORTB bits 0/1/4 never set,
and no ATtiny strobe ever overlapping a live machine's burst.
The Makefile compiles with
avr-gcc -mmcu=attiny85 -DF_CPU=8000000UL -Os -mrelax -Wall -Wextra
and converts the ELF to Intel HEX with avr-objcopy -O ihex.
F_CPU=8000000UL must match the fuse setting (8 MHz internal RC) or all
the millisecond delays will be off by 8×.
main.c also enforces this at compile time: building with F_CPU below
8 MHz (or with F_CPU unset) stops with an #error instead of producing
firmware that runs but never detects the combo. If you hit that error,
build with -DF_CPU=8000000UL and burn lfuse 0xE2 (see §4.1).
Do NOT use a TL866/minipro for this chip. That path was found to write each 64-byte AVR flash page at twice its address while its own read-back hides the corruption (it makes the same addressing error, so verification "passes"). Any Arduino running the stock ArduinoISP example is a correct, trustworthy ISP programmer instead.
| Arduino | → | ATtiny85 |
|---|---|---|
| 5V | → | pin 8 (VCC) |
| GND | → | pin 4 (GND) |
| D51 (MOSI) | → | pin 5 |
| D50 (MISO) | → | pin 6 |
| D52 (SCK) | → | pin 7 |
| D10 | → | pin 1 (/RESET) |
The ATtiny must be out of the mod board while programming (the mod's series resistors and the unpowered SVI load the SPI lines).
| Fuse | Value | Meaning |
|---|---|---|
| Low | 0xE2 | internal 8 MHz RC oscillator, CKDIV8 off |
| High | 0xDD | BOD 2.7 V enabled — mandatory: the SVI's slow power ramp otherwise causes marginal boots |
| Ext | 0xFF | factory default |
0x62 = 1 MHz — too slow; must become 0xE2.make # build main.hex (also enforces the no-sbci rule)
make fuses # write lfuse=0xE2 hfuse=0xDD efuse=0xFF (once per chip)
make flash # program main.hex (avrdude writes + verifies)(Flashing the repository's ready-made main.hex without the toolchain —
only avrdude needed — equivalent raw commands:
avrdude -c stk500v1 -P /dev/ttyACM0 -b 19200 -p t85 -U flash:w:main.hex:i
and for the one-time fuses
avrdude -c stk500v1 -P /dev/ttyACM0 -b 19200 -p t85 -U lfuse:w:0xE2:m -U hfuse:w:0xDD:m -U efuse:w:0xFF:m.
If the port differs, adjust -P / use make flash PORT=/dev/ttyACMx.
Serial permission error: add yourself to the dialout group.)
After flashing, optionally read the chip back with
avrdude ... -U flash:r:readback.hex:i and compare against main.hex to
confirm the write.

(docs/schematic.pdf is the printable version. If you built the PCB from
section 1.1, the seven pads are already labelled with the signal names in
the last column below, and the parts are already in place — you only need
the "solder point on SVI-728" column.)
| ATtiny pin | Parts at the pin | Solder point on SVI-728 | Signal |
|---|---|---|---|
| 1 (PB5) | none — leave unconnected (chip's own /RESET) | — | — |
| 2 (PB3) | 1 kΩ in series | IC41 (8255A) pin 22 (PB4) | X4 — column 4 return (CODE) |
| 3 (PB4) | 100 Ω in series | T4 base leg (junction with diode D4) — see below | RESET trigger |
| 4 (GND) | other end of the 100 nF | any ground point, e.g. IC41 pin 7 (8255 GND) | GND |
| 5 (PB0) | 100 Ω in series; 10 kΩ pull-up to pin 8 | IC42 (7445) pin 7 (output O6) | Y6 — keyboard row 6 strobe (GRAPH/CODE row) |
| 6 (PB1) | 100 Ω in series; 10 kΩ pull-up to pin 8 | IC42 (7445) pin 9 (output O7) | Y7 — keyboard row 7 strobe (ESC row) |
| 7 (PB2) | 1 kΩ in series | IC41 (8255A) pin 20 (PB2) | X2 — column 2 return (GRAPH, ESC) |
| 8 (VCC) | 100 nF ceramic to pin 4, right at the chip | any +5 V point, e.g. IC41 pin 26 (8255 VCC) | +5 V |
Two notes on the passives: the 100 nF must be a ceramic, not an electrolytic (a large cap slows the VCC rise at power-on), and the 10 kΩ pull-ups are required because the 7445 row outputs are open-collector — without them the rows recover slowly after each strobe.
Why T4's base and NOT Z80 pin 26 (important!): the SVI-728 has no single reset net. The CPU schematic (STM-728-001) shows a power-on reset generator — an RC network (C112 + resistor from +5 V) driving transistor T4 through diodes D2/D4 — whose collector node (pulled up by R34, 330 Ω) fans out into separate buffer gates: one inverter drives Z80 pin 26 privately, others generate the independent /RST and RST copies that go to the cartridge slot (pin 15), the 8255 (pin 35), the PSG and the printer port. Pulsing Z80 pin 26 directly would (a) fight a TTL gate output and (b) reset only the CPU — a Carnivore2 or any other cartridge would keep its state and NOT return to its boot menu.
Pulling T4's base low instead switches T4 off, its collector rises via R34, and every buffered reset copy asserts simultaneously — an exact replica of power-on reset, machine-wide. It is also electrically gentle: base current is well under 1 mA, and the 100 Ω series resistor limits the brief discharge surge from C112 through the diodes. In normal operation T4's base sits at ~1.4 V and its collector at ~0 V; at power-on (and during our pulse) the collector jumps to ~5 V — an easy way to verify you found the right transistor with a scope or voltmeter.
Keyboard sensing note — the Y6 diodes: the modifier keys on row Y6 (GRAPH, CODE, SHIFT) have series diodes on the keyboard PCB (anti-ghosting, sheet STM-728-009). When GRAPH or CODE is held, X2/X4 therefore only drop to ~0.8 V (7445 low level + one diode drop) instead of ~0.2 V. This is still a valid logic low for the ATtiny (V_IL = 1.0 V guaranteed at 5 V) — the machine's own 8255 lives with the same level — but do NOT add external pull-up resistors to X2/X4: extra pull-up current would raise that voltage further. The ATtiny's weak internal pull-ups (~35 kΩ) are fine. The columns already have 3.3 kΩ pull-ups to +5 V on the logic board.
Verify before soldering. Print the Appendix B schematic from the service manual (archive.org: "MSX SVI-728 Service And Technical Manual Vol. 1") or beep out the pins with a multimeter in continuity mode:
| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | 100R | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1, R2, R3 |
| 2 | 10k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R6, R7 |
| 2 | 1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R4, R5 |
| 2 | M2 | MountingHole:MountingHole_2.2mm_M2 | H1, H2 |
| 1 | 100n | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C1 |
| 1 | ATtiny85-20PU | Package_DIP:DIP-8_W7.62mm_Socket | U1 |
| 1 | Wire pads | svi728reset:SolderPad_1x07_P2.54mm | J1 |

bwack/C64-Switchless-Multi-Kernal-27C256-adapter
Kernal switcher for the C64/C64C/C128

plusvic/simplebus2-intercom
General description of the Simplebus2 protocol used by some Comelit's intercoms. Hardware for retransmitting Simplebus2 messages over UART.

osmocom/osmocom-analog
Software Implementation of analog cellular telephony systems like NMT, TACS, IMTS, A/B/C-Netz; mirror of https://gitea.osmocom.org/cellular-infrastructure/osmocom-analog

strickyak/jerboa-attiny85-mod-synth
Modular Synthesizer using an ATtiny85 chip for each module.


Hack-a-Day/Remoticon_KiCad_Blender
support files for the 2020 Remoticon KiCad to Blender > PCB renders workshop

It measures 48 × 42 mm and has 2 copper layers, 1.6 mm thick.
12 parts, built around the ATTINY85-20PU. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the arttu76/svi728keyboardreset repository on GitHub, at the commit this page was made from: the board is hardware/svi728reset.kicad_pcb and its schematic hardware/svi728reset.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask arttu76 before reusing the design.