Skip to content

Instantly share code, notes, and snippets.

@commandblockguy
commandblockguy / test.py
Last active December 28, 2021 14:08
test
from math import ceil
platform = ''
try: from sys import platform
except: pass
def nop(*argv): pass
show, wait = nop, nop
neg_fill_rect = False
has_color = True
// Runs on TM4C123GH6PM
// Prints to the debug serial at 115200 baud
const char main[] = "yF]1R@@2@2RCRCRAv@VA021:/$ <{F<30;0%1=nC^AnCm@Ox'@=D-D-D-D-D1109Ox'@=D1109Up120:1%0=Ox/@1109wC_A8GBMTNi@o`XdoDjmZoEZhJJgMVDAHOBFhhHc`LhE@dDZDOBO`@H`HgDTj`XFOH@@@fILh@XdGDF@FfLBLaBfMHfINdhNhhJDGPF@DflXHAPfiZFIRDHXD@VAMTHhXdgRB@VfJNLbNFkLFfVDHZ`DRbAFI@TDGX@@PO@Pj@XoKJfEBj@J``@O`FeaVOlXDiBJGJaDJiGTFDDJ@Z@@Di`Le@@JgZaeXigHfIJj@N@aBi@DIAZjaF`FNIaNEgNjgBBdNIGNKdBjE@`l@ieVAkZIETbaViePcGBIeZcmRieTdCBiEBKFFJfP`mJIFVAlRifBBbRifLchDiFLCnPIFHdDZiFRjfVJDR@KRidTAJRIdXB`JIDBCFFiDBCLJidPDBXIdR@OVObFNhPAKJlMHOhZadNK`T@ORObXOLPBHHlmXoh@D`PH`N@oXoBNBlNcIFlMPOHLDD@I`R`oFobZe@ZCJHlMVOhHDhTj@@lMBOHBk`RH`ZLmLOHZKdLi`ZLmBoHVKhJj@RLmJOHJL`FK`VegRJ`X`BDi`BhdVjBF@IBIBZHjJJC@@jHicV`OToBBjd@BNFlMBOhLCL@N`ZAhJIBFaIDiCNAnJIBTaOHicX@oXObFfhLClHlmROHJIlJl@TLMXohHJDJl`LlmVoHTjlLN`VCdTIbXCE@IcHcjPIbNcKTICLD@ViBVdaZicVlkZJG@bEViGRg`VJAJ`hFiaJAGDiaZamBiAZcCPiaDciNIaHCoHIAJE@Tj`R`CRI@HlLFjGBBFBiGJbhRigTEHJJ@X`dNI@N`GFi@X@NVI@JaCZI@NaFLI`@BCRI@T@@VBeRbjRI`FDE
// For compatibility. Not sure with what.
#define int const void *
// It's good practice to inline frequently used functions.
#define main() main??(??)
// Never assume that NULL is 0. This will keep potential future collaborators on their toes.
#undef NULL
#define NULL 26880
#define O430 &15??(main??)
@commandblockguy
commandblockguy / hook_manager.txt
Created February 19, 2020 04:17
Random incomprehensible scrawlings about hook manager spec
Currently unnamed CE hook manager:
The system will have the following components:
Hook executors - Each TI-OS hook has an associated entry point which is responsible for calling all user hooks for that type.
Hook arrays - An null-terminated array of pointers to user hooks for a particular hook subtype, sorted by priority. The array is read by the hook executor each time it is called, and is completely overwritten by the hook manager each time a change is necessary.
Hook manager - A library that is responsible for installing the hook executors and maintaining the hook arrays. The hook manager is only called when installing, changing, or viewing metadata of user hooks.
Hook database - Internal data storage for the hook manager than consists of a list of hooks and their metadata.
User hooks:
User hooks are like OS hooks, but are called by the hook executor rather than TI-OS
@commandblockguy
commandblockguy / CMakeLists.txt
Created November 7, 2019 23:01
CMakeLists.txt file for use with the CE C toolchain and CLion
cmake_minimum_required(VERSION 3.15)
# Change the project name below
project(projectname C)
set(CMAKE_C_STANDARD 90)
include_directories(src)
include_directories(src/gfx)
include_directories($ENV{CEDEV}/include)