Log In  
Follow
arnaught

PUSH (Picotron Upgraded SHell) is a modified version of terminal.lua I made that allows you to add modifications from lua modules. You can place modules in /appdata/system/terminal/ and PUSH will load them.

Without any modules, PUSH changes very little (cd with no arguments acts as cd /, typing a path without cd will cd to it), but modules let you add more functionality.

In the repo, I have a list of examples of the sort of things you can do with PUSH, including changing the prompt, adding and overriding commands, and adding shortcuts.

cd.lua is my favorite module so far, I think. It adds replaces the default cd command and adds fish-style directory history.

https://github.com/Rayquaza01/picotron-upgraded-shell

This is very WIP, so if you have any trouble or suggestions for how to improve PUSH, let me know!

0 comments



Cart #prt-0 | 2024-11-05 | Embed ▽ | License: CC4-BY-NC-SA
3

This is a tool that lets you remotely control Picotron from the host and vice-versa.

You can run commands in Picotron by running prt <COMMAND> from the host

This is useful when working with an external editor. You can load and run the updated source code from the external editor, and build/extract the cartridge.

You can also run host commands from inside of Picotron with the host command (included in the cart at /exports/appdata/system/util/host.lua). You can even use pipelines!

Full usage and installation instructions are included in the repo: https://github.com/Rayquaza01/picotron-remote-terminal

There is an issue I know about where if the cart is running for a while, it will start dropping commands seemingly at random. Not sure exactly what causes this, but restarting the cart seems to fix it.

3
0 comments



This isn't a Picotron specific thing, but you can use ANSI escape codes inside printh to make your logs colorful, which can be helpful with debugging.

To set the color, typically you do \033[38;5;<COLOR>m or \033[38;2;<RED>;<GREEN>;<BLUE>m. This sets the foreground color to a color from this chart or an RGB color code (if your terminal supports truecolor).

This just works in Picotron, but you have to do \27 instead of \033. (This is the escape code for ESC, which is 27 in decimal and 033 in octal.)

However, writing ANSI codes by hand is a pain, so I wrote a function to make inserting these codes easier, using a bbcode-like syntax.

Foreground color can be set with [fg=1][/fg] or [fg=#ff0000][/fg]
Background color can be set with [bg=1][/bg] or [bg=#ff0000][/bg]
Bold can be set with `&lsqb;b]

[ Continue Reading.. ]

5
0 comments



Cart #fzf-2 | 2024-10-21 | Embed ▽ | No License
4

I built a fuzzy finder. You can quickly search for and open files (anything supported by /system/util/open.lua, so folders, lua files, text files, pods, etc.) Additionally, it can follow .loc files to their destination before opening (which open doesn't currently support), and it can execute .p64 files instead of opening them!

The full code and documentation is available here: https://github.com/Rayquaza01/fuzzy-finder-picotron/

This uses swarn/fzy-lua (MIT License) and mergesort.lua from TheAlgorithms/Lua (MIT License)

Changelog

v1.1 - Oct 21, 2024

[ Continue Reading.. ]

4
2 comments



I figured out how to get the Pico8 special characters (the ones you get when typing capitals) in Picotron. The special characters start at U+0080 and go all the way up to U+0099. All unknown characters seem to display the same.

I don't know of a convenient way to type these into picotron, but if you copy paste the list below, you can save them to a text file for reference. It's a little annoying because none of them are actually printable characters. UTF-8 doesn't seem to like having them bare, so when you copy paste, it will actually be U+00C2 U+0080 instead of just U+0080.

A: €
B: 
C: ‚
D: ƒ
E: „
F: …
G: †
H: ‡
I: ˆ
J: ‰
K: Š
L: ‹
M: Œ
N: 
O: Ž
P: 
Q: 
R: ‘
S: ’
T: “	
U: ”
V: •
W: –
X: —
Y: ˜
Z: ™
Unknown: Â
6
1 comment



Cart #magic8ball-0 | 2024-03-24 | Embed ▽ | License: CC4-BY-NC-SA
7

This Picotron cartridge can predict the future! Simply ask it any yes or no question, shake the window, and you'll get your answer!

(I hear you can also press z to get an answer, but that seems less fun than shaking the window.)


This was a fun little project to make. I finally figured out how to edit the cartridge's metadata! (Though I'm still not sure how to do it on a fullscreen cartridge).

I wanted to put a sound effect when shaking the window, but I have no idea how to work the instrument editor lol.

7
3 comments



Some linux distros include code in the default .bashrc that chain loads files from ~/.bashrc.d. This is useful for keeping your config organized. (I like keeping my aliases in a separate file, for instance.)

I've made a snippet that does this for Picotron. Add this to your /appdata/system/startup.lua, and it will chain load any .lua files in the folder /appdata/system/startup.

startup_folder = "/appdata/system/startup"
if fstat(startup_folder) == "folder" then
	for file in all(ls(startup_folder)) do
		filename = startup_folder .. "/" .. file
		if fstat(filename) == "file" and file:find("%.lua$") then
			create_process(filename)
		end
	end
end
6
1 comment



Cart #pipes-0 | 2024-03-19 | Embed ▽ | License: CC4-BY-NC-SA
9

I made a pipes screensaver, inspired by the classic 3D Pipes Screensaver.

A pipe of a random color is created on the somewhere on the edge of the screen. It will expand outwards from its starting point, choosing to go straight, left, or right. The pipe will stop when it goes out of bounds, and a new pipe will be created.

I am not saving information about the pipes manually. I just draw the current pipe, and never cls. All the old pipes stay on screen and the new ones are drawn above. Previously, I saved all of the pipe connections and colors in a 30*17*6 table which was redrawn every frame, but then I realized that I could get rid of that by just removing cls. So instead of storing and drawing up to 3060 sprites every frame, instead I only store and draw one.

[ Continue Reading.. ]

9
0 comments



Cart #r01mastodon-0 | 2024-03-18 | Embed ▽ | License: CC4-BY-NC-SA
18

Mastodon

I made a basic proof of concept mastodon client in picotron! All it does is fetch a single status, given an instance and status id.

I am using the text editor GUI widget to display the text and take your input. To select the instance and status id, simply type them on the given lines. To submit, type a y at the end of the last line.

(For example: if you wanted to fetch https://mastodon.social/@zep/112095878554051090, the instance would be mastodon.social and the status id would be 112095878554051090)

Once a post is displayed, you can go back to the menu by typing y at the end of the first line.

I made a different version of this earlier, but that version used a python server to handle the json and text formatting. This version does everything entirely within picotron.

[ Continue Reading.. ]

18
2 comments



Cart #picotron_utilities-2 | 2024-11-12 | Embed ▽ | License: CC4-BY-NC-SA
26

I made a handful of commandline utilities for picotron that you might find useful.

https://github.com/Rayquaza01/picotron-utilities

So far, Picotron Utilities has:

cat - print files
touch - create new files
tree - print tree view of a directory
wget - download a file using fetch()
grep - search in a file or recursively search through all files in a folder
frange - print a file or range w/ line numbers
pwd - print the current working directory
echo - print given arguments
fd - search for a file name
stat - print file status and metadata

Installing as a Yotta Package

You can install the utilities included in this cart with yotta util install #picotron_utilities

[ Continue Reading.. ]

26
8 comments



Cart #wordle-1 | 2024-03-17 | Embed ▽ | License: CC4-BY-NC-SA
7

Wordle for Picotron

This is a basic wordle clone. A green letter is in the correct position, a yellow letter is in the wrong position, and a gray letter is wrong.

This uses an invisible text editor to let you type the letters. Press enter to submit your guess.

If you enter a guess that is less than 5 letters, it will clear your text input. There is also no check to see if your guess is a real word, so you can enter random letters if you want. The word list I used is the official wordle list, which I got from here.

Hope you enjoy it!

Changelog

[2024-03-17]

  • Gray boxes on the line you're typing always display

[ Continue Reading.. ]

7
3 comments