commit f14bd1d
0uppy
·
2026-07-26 21:22:44 +0000 UTC
parent cfd2c39
cotton v0.2 - updated the README md file a bit AND also finally got around writting doccumentation for cotton and it's ecosystem!! yay!! :D
5 files changed,
+135,
-26
+7,
-26
1@@ -2,9 +2,11 @@
2
3 
4
5-cotton 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+cotton is a tiny virtual computer that lives in your windows - it was written in C99 and has 64 KiB of memory and runs programs written in the cot programming language.
7
8-on 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.
9+cotton was originally based on a CHIP-8 emulator, but has since evolved into its own thing somewhat inspired by [uxn](https://100r.co/site/uxn.html) (check it out!! its an amazing project!!) and the concept of a small, easy-to-understand virtual computer.
10+
11+cotton is a passion pet project and while i do get alot of suggestions via my friends, i am the only and main developer of it, so, don't expect anything grandiouse or of perfect quality, at the end of theday this is all a big learning project that im taking at my own pace!! xP
12
13 ## building cotton,
14
15@@ -21,32 +23,9 @@ ninja -C build
16 cotton <file.cot>
17 ```
18
19-## the cot language
20-
21-as 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:
22-
23-```
24-print "blah blah blah" # prints text to the screen
25-wait # waits for x seconds
26-kill # exits cotton
27-color # colors text (there are 7 options, this will be doccumented later but you can also see it on cotton.h)
28-
29-comments written as ' # '
30-```
31-
32-i plan to focus more on cot itself for the next update so expect this list to grow some more by then :P
33-
34-## tools
35-
36-this is more so a thing for me, but, i figured i'd explain it:
37-
38-you 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 ^^
39-
40 ## docs
41
42-as of writting this (early stages of cotton v0.2) there is no doccumentation, however, i plan to add it either this or next update :)
43-
44-alot of what is said on this readme md file will prob end up being deleted in favour of being properly placed there xP
45+before v0.2, i used to have everything about the cot programming language and cotton's tooling on this md file, but, as i have now made docs for cotton and it's ecosystem, i strongly suggest that anyone who wants to read the docs gets [mandoc](https://mandoc.bsd.lv/) (should be called packaged as mandoc on your distro of choice, probably :P) to do so!!
46
47 ## cotton's mascot
48
49@@ -59,3 +38,5 @@ this is cotton's mascot!! his name is ton!! he was drawn by me using cotton's co
50 i'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 ^^
51
52 i'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 :)
53+
54+and also [pita](https://pita.im/), [lotte](https://srcdump.net/lotte/), [merc](https://merc.4plt.ch/) and [shrub](https://shrub.industries/) (in no particular order) for all of the cool suggestions and guidance for cotton as of the release of v0.2, thank you so much!! :D
+52,
-0
1@@ -0,0 +1,52 @@
2+.Dd July 2026
3+.Dt COT 5
4+.Os cotton 0.2
5+.Sh NAME
6+.Nm cot
7+.Nd the cot programming language
8+
9+.Sh DESCRIPTION
10+
11+cot is a small (both in size and features) interpreted programming language made
12+to be simple, easily readable, approachable and to be used FOR cotton(1).
13+
14+cot's development is being made side by side with cotton's development, as such,
15+both are built with eachother in mind.
16+
17+cotton's keywords are called "commands" , below is a reference list of every command
18+in cot (as of cotton 0.2) and how to use it properly.
19+
20+.Sh COMMANDS
21+.Bl -tag -width "pixel Ar (x) (y) (color)"
22+.It Ic print Ar (text)
23+Prints text to the screen.
24+.It Ic wait Ar (seconds)
25+Waits for an x ammount of seconds.
26+.It Ic kill
27+Kills the ongoing cotton process.
28+.It Ic color Ar (color)
29+Colors text (there are 7 options, which can be seen in cotton.h!! i'd list them here but blehhh).
30+.It Ic var Ar (name) (value)
31+Assigns a value to a variable.
32+.It Ic add Ar (var) (value)
33+Adds a value to a variable.
34+.It Ic sub Ar (var) (value)
35+Subtracts a value from a variable.
36+.It Ic mult Ar (var) (value)
37+Multiplies a variable by a value.
38+.It Ic div Ar (var) (value)
39+Divides a variable by a value.
40+.It Ic pixel Ar (x) (y) (color)
41+Draws a pixel at the specified coordinates (this will be probably be a bit adjusted in the future).
42+.It Ic clear
43+Clears whatever is currently on the screen.
44+.It Ic input Ar (var)
45+Waits for user input and stores it in a variable.
46+.El
47+
48+NOTE: some of the commands above are subject to change given that cot(ton) has yet to reach it's first stable release - even then, any update to any command will be doccumented here and i will also do my best to not break the whole syntax every update ;w;
49+
50+.Sh SEE ALSO
51+.Xr cotton 1 ,
52+.Xr eiki 5
53+
+36,
-0
1@@ -0,0 +1,36 @@
2+.Dd July 2026
3+.Dt COTTON 1
4+.Os cotton 0.2
5+.Sh NAME
6+.Nm cotton
7+.Nd a tiny virtual computer that lives in your windows
8+
9+.Sh SYNOPSIS
10+.Nm
11+.Op Fl s Ar scale
12+.Ar file.cot
13+
14+.Sh DESCRIPTION
15+
16+cotton is a tiny virtual computer that lives in a window. It has 64 KiB of memory
17+and runs programs written in the cot(5) programming language.
18+
19+cotton was originally based on a CHIP-8 emulator, but has since evolved into its
20+own thing inspired by uxn (go check it out, its an amazing project!!) and the concept of
21+a small, easy-to-understand virtual computer.
22+
23+cotton is a passion pet project and while i do get alot of suggestions via my friends,
24+i am the only and main developer of it, so, don't expect anything grandiouse or of perfect quality,
25+at the end of the day this is all a big learning project that im taking at my own pace!! xP
26+
27+.Sh OPTIONS
28+.Bl -tag -width "-s Ar scale"
29+.It Fl s Ar (scale)
30+changes the size multiplier of the cotton window (as of cotton 0.2 there is only 2 or 4).
31+.El
32+
33+.Sh SEE ALSO
34+.Xr cot 5 ,
35+.Xr eiki 5 ,
36+.Xr eikimaker 1
37+
+17,
-0
1@@ -0,0 +1,17 @@
2+.Dd July 2026
3+.Dt EIKI 5
4+.Os cotton 0.2
5+.Sh NAME
6+.Nm eiki
7+.Nd the bitmap font for cotton
8+
9+.Sh DESCRIPTION
10+
11+eiki is the custom 6x8 bitmap font used by cotton(1) for text rendering.
12+
13+there isn't a whole lot to say here ermmm,..,
14+
15+.Sh SEE ALSO
16+.Xr cotton 1 ,
17+.Xr cot 5 ,
18+.Xr eikimaker 1
+23,
-0
1@@ -0,0 +1,23 @@
2+.Dd July 2026
3+.Dt EIKIMAKER 1
4+.Os cotton 0.2
5+.Sh NAME
6+.Nm eikimaker
7+.Nd the Eiki font character generator utility for cotton
8+
9+.Sh SYNOPSIS
10+.Nm ./eikimaker
11+
12+.Sh DESCRIPTION
13+
14+eikimaker is an interactive CLI utility written in Go that generates custom 6x8 pixel bitmap font
15+characters for the cotton(1) ecosystem - despite the name, i incentivate anyone who may want to
16+make their own font to use eikimaker as a means to do so!!
17+
18+when used, eikimaker prompts the user for a target character and then proceduraly displays an 8 row grid as the user draws their character
19+- when done, it then packs each row into a byte representation and it sends the result directly into an eikis.txt file.
20+
21+.Sh SEE ALSO
22+.Xr cotton 1 ,
23+.Xr cot 5 ,
24+.Xr eiki 5