Skip to content

Instantly share code, notes, and snippets.

@tomstorey
tomstorey / COMET68k_CPLD.sv
Last active March 12, 2024 06:38
COMET68k_CPLD.sv
`timescale 1ns/1ns
/* These defines determine which machines are compiled in to the design */
`define INCLUDE_GATED_RESET
`define INCLUDE_BUS_WATCHDOG
`define INCLUDE_DRAM_MACHINE
`define INCLUDE_XBUS_MACHINE
`define INCLUDE_INTERRUPT_CONTROLLER
`define INCLUDE_BUS_ARBITER
`define INCLUDE_ETHERNET_MACHINE
@tomstorey
tomstorey / pois.py
Last active January 10, 2022 19:16
A simple Python3 script convert a list of POIs into a .ov2 file for loading e.g. onto a GPS satnav.
import struct
pois = [
('McLaren', 51.34314, -0.54252),
('Williams', 51.61672, -1.41096),
('Alpine', 51.92018, -1.38986),
('Haas', 52.06374, -1.31433),
('Mercedes', 52.02262, -1.1495),
('Aston Martin', 52.07592, -1.0296),
('Red Bull', 52.00815, -0.6929),
@tomstorey
tomstorey / z80_malloc.s
Last active August 12, 2024 15:09
malloc and free implementation in Z80 assembly
heap_start .equ 0x9000 ; Starting address of heap
heap_size .equ 0x0100 ; Number of bytes available in heap
.org 0
jp main
.org 0x100
main:
ld HL, 0x8100
@tomstorey
tomstorey / DefaultKeyBinding.dict
Created April 3, 2018 07:32
Mac key bindings
{
/* Home */
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* End */
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
/* Page Up/Down */