Skip to content

Instantly share code, notes, and snippets.

View jonpovey's full-sized avatar

Jon Povey jonpovey

  • Brisbane, Australia
View GitHub Profile
@jonpovey
jonpovey / blueshift_airlock.mips
Created August 23, 2023 14:45
Better auto airlock IC10 code for Stationeers
alias extDoor d0 # blueshift trick airlock
alias intDoor d1
alias extVent d2
alias intVent d3
alias gasSense d4
define doorsHash HASH("StructureCompositeDoor")
define tankMaxPressure 58000 # option: allow burst!
define tankRebalanceDelay 2
move r10 2.5 # ext atmos target repressure, kPa
move r11 20.0 # int atmos target repressure
async with join_any() as tm:
@tm.fork
async def block1() -> None:
...
tm.add("test", Combine(...))
# join_any here
await tm.join_all() # wait for them all to finish now
@jonpovey
jonpovey / spec_1.7_irqs.txt
Created May 6, 2012 03:25
Clarification of interrupt things in DCPU spec 1.7
Clarification of interrupt things in DCPU spec 1.7
A couple of questions, and suggestions.
=== EXECUTIVE SUMMARY ==========================================================
1. Is hardware still notified about triggering of interrupts it has sent to
DCPU? It looks like that feature has been removed (good).
2. Can you clarify that if there are interrupts on queue, after RFI the
interrupt handler is immediately called again? This is the right way to do it
@jonpovey
jonpovey / HIT_HMD2043.txt
Created April 26, 2012 13:30 — forked from DanielKeep/HIT_HMD2043.txt
Harold Innovation Technologies - HMD2043 and HMU1440 spec sheets
HIT_HMD2043
__ __
|| ||
||==|| I T
_|| ||_
Harold Innovation Technologies
"If it ain't a HIT, it's a piece of..."
@jonpovey
jonpovey / comments.txt
Created April 26, 2012 08:04
DCPU 1.4 spec interrupt comments
Hi Notch,
EXECUTIVE SUMMARY:
Please add interrupt *masking* rather than just enable/ignore options, as this means
we can have critical sections without losing interrupts (random clock drift bad).
LONG-WINDED VERSION:
Losing interrupts makes me sad :(
(And will be confusing and hard to debug)