Skip to content

Instantly share code, notes, and snippets.

@Achie72
Last active August 9, 2023 14:31
Show Gist options
  • Save Achie72/f5c941f6c2fa93ac66096c97c30ff97e to your computer and use it in GitHub Desktop.
Save Achie72/f5c941f6c2fa93ac66096c97c30ff97e to your computer and use it in GitHub Desktop.
PICO-8 Lowres Mode and Custom font setup
-- made for my Lowrezjam2023 entry - Siege of Muldyr!
-- you can read the corresponding devlog on:
-- kofi article: https://ko-fi.com/post/Siege-Devlog-1--Lowrezjam-2023-How-to-Start-Wh-I2I3O14RM
-- itch devlogs: https://itch.io/t/3057134/siege-devlog-series
function _init()
-- init up data
-- lowres mode
poke(0x5f2c,3)
-- custom font load
poke(0x5f58,0x81)
poke(0x5600,unpack(split"4,8,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,63,63,63,63,63,63,0,0,0,63,63,63,0,0,0,0,0,63,51,63,0,0,0,5,2,5,0,0,0,0,0,5,0,5,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,1,0,0,0,0,0,0,0,4,6,0,0,0,0,0,99,54,28,62,8,62,8,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,5,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,54,54,0,0,0,0,0,0,54,127,54,54,127,54,0,8,62,11,62,104,62,8,0,0,51,24,12,6,51,0,0,14,27,27,110,59,59,110,0,12,12,0,0,0,0,0,0,2,1,2,0,0,0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,0,0,7,2,7,0,0,0,0,0,7,4,3,0,0,0,0,0,5,3,5,0,0,0,0,0,1,1,7,0,0,0,0,0,7,7,5,0,0,0,0,0,3,5,5,0,0,0,0,0,7,5,7,0,0,0,0,0,7,7,1,0,0,0,0,0,7,7,4,0,0,0,0,0,7,1,1,0,0,0,0,0,6,2,3,0,0,0,0,0,7,2,2,0,0,0,0,0,5,5,7,0,0,0,0,0,5,5,2,0,0,0,0,0,5,7,7,0,0,0,0,0,5,2,5,0,0,0,0,0,5,7,2,0,0,0,0,0,3,2,6,0,0,0,0,0,6,3,6,0,0,0,0,0,2,0,2,0,0,0,0,0,3,6,3,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,127,0,85,42,85,42,85,42,85,0,65,99,127,93,93,119,62,0,62,99,99,119,62,65,62,0,17,68,17,68,17,68,17,0,4,12,124,62,31,24,16,0,28,38,95,95,127,62,28,0,34,119,127,127,62,28,8,0,42,28,54,119,54,28,42,0,28,28,62,93,28,20,20,0,8,28,62,127,62,42,58,0,62,103,99,103,62,65,62,0,62,127,93,93,127,99,62,0,24,120,8,8,8,15,7,0,62,99,107,99,62,65,62,0,8,20,42,93,42,20,8,0,0,0,0,85,0,0,0,0,62,115,99,115,62,65,62,0,8,28,127,28,54,34,0,0,127,34,20,8,20,34,127,0,62,119,99,99,62,65,62,0,0,10,4,0,80,32,0,0,17,42,68,0,17,42,68,0,62,107,119,107,62,65,62,0,127,0,127,0,127,0,127,0,85,85,85,85,85,85,85,0"))
end
-- the thirs bitmap is spitted out by the tool I linked after you run it
-- just paste it in, and bam, custom fonts and lowres mode!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment