name soggy/cotton
description tiny virtual computer that lives in windows
last change 2026-07-22
clone url
https://srcdump.net/soggy/cotton.git

commit briefs

c2b07b8
0uppy  ·  2026-07-20

branches

refs

tree

readme

 1# cotton
 2
 3![cotton](imgs/cotton.png)
 4
 5cotton is a tiny virtual computer that lives in a window. it originally had a chip-8 emulator as a base but i ended up rewriting the vast, VAST majority of it to my liking. cotton is heavily inspired by [uxn](https://100r.co/site/uxn.html) and a little bit by [pico-8](https://www.lexaloffle.com/pico-8.php) (go check both projects out, they're awesome!!).
 6
 7on cotton you write programs in `.cot` files using the cot programming language — a simple, straightforward, lua-esque language (that is being made alongside cotton's development) made FOR cotton.
 8
 9## building cotton,
10
11```
12meson setup build
13ninja -C build
14```
15
16(make sure you also have sdl installed or else windows wont open wawawaw!!)
17
18## running cotton,
19
20```
21cotton <file.cot>
22```
23
24## the cot language
25
26as i said on at the top of this file, cot is being developed alongside cotton and is meant to be small and straightforward, as of writting this (v0.1's release) these are the current features it has:
27
28```
29print "blah blah blah"   # prints text to the screen
30wait                     # waits for x seconds
31kill                     # exits cotton
32color                    # colors text (there are 7 options, this will be doccumented later but you can also see it on cotton.h)
33
34comments written as ' # '
35```
36
37i plan to focus more on cot itself for the next update so expect this list to grow some more by then :P
38
39## tools
40
41this is more so a thing for me, but, i figured i'd explain it:
42
43you may notice there is a tools/ folder, in there you will find "eikimaker", a small program i made to help design the eiki font, i might expand on it at some point but for now it works just fine ^^
44
45## docs
46
47as of writting this (early stages of cotton v0.2) there is no doccumentation, however, i plan to add it either this or next update :) 
48
49alot of what is said on this readme md file will prob end up being deleted in favour of being properly placed there xP
50
51## cotton's mascot
52
53![ton](imgs/ton.png)
54
55this is cotton's mascot!! his name is ton!! he was drawn by me using cotton's colour palette!! say hi to ton!! :3
56
57## credits
58
59i'd like to thank [this guide](https://austinmorlan.com/posts/chip8_emulator/) for helping me figure out the initial base for cotton, even if 90% of it is gone by now, it helped me learn alot of stuff that i am now applying for cotton, awesome stuff ^^
60
61i'd also like to thank [chld](https://srcdump.net/chld/) for making a C port of eikimaker.go AND currently working on a haiku backend for cotton - both arent merged to the repo yet but im still very grateful for both :)