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 December 24, 2025 22:40
A simple Python3 script convert a list of POIs into a .ov2 file for loading e.g. onto a GPS satnav.
# Once you have added your POIs to the list below, run the script to output them
# to a file called "pois.ov2".
#
# Next, login to plan.tomtom.com and from the menu on the left navigate to
# My Items > POI Files and then click on Import OV2 File. Once uploaded, the
# file will then be sync'd to your GPS where it is available from My Places in
# the menu.
import struct
@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 */