Hello there. I'm working on a TV console utilizing a Raspberry Pi 3B+, but any Raspberry Pi should work in theory. Essentially, this takes some of my previous cad projects and crams it into something awesome. I present the nameless console(needs a name).
How does it work?
A USB SD card reader functions as a cartridge slot and I made 3D printable shells to go around the SD cards to give them a cartridge look and feel. A bash script loads when the Pi gets turned on that looks for a PICO8 game on the SD card. This can work with other fantasy consoles. I haven't figured out how to get multi-cart games to work with one SD card, but for now, single cart games should work. Right now the TV console project is in beta, but the cad files and startup scripts will be open source.
What I would like is suggestions for this project. I will update later with guides on setting this up. This project can also be used as a template for your own projects if you want.
A couple of pictures of me playing some games.
What is there left to do on this project before its finished?
I need to figure out what I want to do with the front two buttons. I could map them as power and reset, or I could remove them completely. Also, I need to make the console a little bit larger to make plugging in a USB extender into the SD card reader less difficult. In the current design, I have to cut the rubber housing on the USB extender and bend the USB plug 90 degrees, which could damage it. Lastly, I want to figure out how to make cartridges work with multicart games, which I'm unsure how to get that part to work.
I'm looking for suggestions and feedback. Constructive criticism is also welcome.
One suggestion I have, @grhmhome, is to print the cards as pure plastic with a printed sticker on them. It would be a single sticker that you put on the front, wraps around the top, then to the back. The front picture would have the cart art and the back picture could have a 1-bit image, B&W dots that could be read inside the game console itself to play Pico-8.
The advantage ? No need for circuitry for the game card itself. No need for miniature thumb-driver or otherwise. Just visually read the B&W dots on the back of the sticker to derive the cart.
I could certainly write a program to convert a text P8 and make a new 1-bit square image where you can clearly see the B&W dots. I imagine you can too.
For Pico-8 you can also see that the cart itself would NOT include the "cart art" as part of the .P8 program since it is already visually hard-printed as a sticker on the front of the plastic card, making the actual P8 cart that much smaller in file size for the backside B&W dots.
So, you're converting a whole p8 cart into a (certainly gigantic) QR-Code, that you'll have to read with a camera and convert into a .p8 file. That's certainly original but far less practical than a simple SD card reader.
> No need for circuitry
You'll definitely need circuitry to read the QR-Code.
@dw817 Cool idea, but I wouldn't know how to implement something like that. What would read the 1bit image hardware wise? Would a camera be used? I like using SD cards because this could be adapted to work with other programs. What about multicart games?
Well now let me think, @grhmhome, it should be possible. We have Q-Codes and barcodes today.
Even Nintendo Gameboy had a bar-code reader.
And here is one that looks like it hooks up to your PC to read Q-Codes.
Here is a dedicated hardware console that reads barcodes and it affects the games you are playing.
The Apple ][ had a hardware device that would let you scan B&W strips in magazines for Apple ][ games and programs. I can't find info on this now yet I remember owning one myself years ago.
So it may be possible to scan barcodes or Q-Codes using existing technology. No I certainly wasn't expecting you to handcraft the reader yourself unless you were versed in that area.
But if you can find one that reads data, then it's a matter of saving it to a temporary file such as "run.p8" and then just auto-running that one file.
And yes this method if the game were multicart would require you to have multicarts. I don't think the B&W dots could hold more than one cart at a time.
@scambier, no need for circuitry for the carts themselves. Circuitry yes is needed for the console itself.
@dw817 then what circuitry is there to remove? 🤔
The cartridges only hold an SD card, the console has a reader. Replacing that with giant QR-Codes and an optical reader would only complexify the whole thing, at the expense of reliability.
Also, QR-Codes can only hold up to 2953 bytes, so less than 3KB. Celeste.p8 is 87KB, and zipped it's still 20KB. So QR-Codes are out. That's
20*1024*8 bits = 163.840 bits ~= 400x400 teeny tiny pixels to print and read from a small, low-quality camera. If a single pixel is scratched or smudged, your cart is dead.
Interesting, @scambier. I suspect it would have to be some kind of special QR-Code. I could develop one (the data interpreter, not the hardware). And yes Celeste is 87k, but remember also it is 6-bit text. So if you convert Pico-8 to true 8-bit it is smaller than this, 65.5k or possibly a perfect 64k.
And you could remove the
__LABEL__ storage of 8192-bytes that is inside the P8 cart since it's physically printed on the cover of the plastic chip - yielding from 65536 bytes down to 57344 bytes.
And yes, you would need to take care of your carts. You might even have a plastic sleeve for them to keep them dust free.
As for 57k, let me see, 57344, to make that square you would need 677 1-bit dots across and 677 1-bit dots down. Maybe round them up to 678 for checksum at a new cart size of 57460 bytes, a clean 116 byte checksum. So, yep, a bit of work would be involved.
All in all it was just an idea. I've never seen a system like this, where you have actual games played from read B&W dots. I just thought it was a novel method and the hardware being possible certainly with old technology like the Famicom barcode reader or Q-Codes, the physical game carts themselves could be quite inexpensive indeed with no circuitry at all in them.
I suppose there is also a magnetic strip possibility. But I'm not sure how much data that takes - and that MIGHT be expensive to produce, but likely still cost less than having a true miniature SD card for every game.
This could be used like a 3rd party add-on. I like the idea. Nintendo had their eReader thing. The reason I opted for SD cards was that they're readily available and simple to get running. I could change the bash script just to look for a .p8 file instead of run.p8.png, but I don't know how to get it to load more than one cart. The cartridge shells technically do need a screw to attach together, but some of mine didn't need one and just snapped together.
I'm using a standard sized sd card with a 2GB capacity. Any capacity sd card should work, but I feel that the larger capacity SD cards are wasteful especially since a Pico8 game is pretty small. This is how I was assembling the cards. A tiny strip of spare electrical tape and sometimes I didn't need a small screw.
I'm storing a Pico8 rom file (file.p8.png) on each SD card. Right now the rom file has to be renamed to run.p8.png, but I can change the script to just search for a p8.png file. Ultimately I would like to figure out how to get multicart games to work
I'm not exactly sure about SD cards as prices fluxuate, but on Amazon, I think you can get 5 SD cards (2GB capacity) for 30 USD which seems like a bit too much. On eBay, a Chinese company is selling a bunch of tiny capacity SD cards for dirt cheap, but I cannot tell if they're great or not as I'm not sure they are worth the gamble. I'd estimate the cost of each final cartridge to be around 7 bucks. Maybe there are less expensive options for SD cards
So that's not too bad, @grhmhome. If I could play Pico-8 on my widescreen television with a great joystick or 2- for 2-players, a superbly crafted system and environment, I would buy your console and games.
The main concern I am seeing though outside of physical production is the games themselves. Would every game author allow their games to be sold in this manner with an excellent chance of never receiving constant revenue for them ?
A game dev or publisher could always do a limited production run of a game on SD cards like how some artists on Bandcamp would sell physical releases of their music. I know lots of people who prefer physical copies of their games. A dev or publisher could throw in binaries for those who don't have a physical console.
I have added a Github repository of my project with the STL files (beta) and scripts to get things running.
How do I use the scripts and get things running?
First, you will need to flash a SD card with Retropie or another distro that is minimal. After that, you will want to copy your pico-8 directory to your boot partition (/boot) on the micro-SD card. To enable ssh, you will want to create a blank file in your boot partition called ssh. In Windows, you can use notepad++, but in other operating systems, you could use your favorite text editor, such as nano or vim. If you want to enable WiFi, you can create a file in your boot partition called
wpa_supplicant.conf https://retropie.org.uk/docs/Wifi/ has more information.
When you turn on your Raspberry Pi, you will want to move your pico-8 folder to your home directory (/home/pi for example). If you are unsure how, just type
cd /boot followed by
cp -r pico-8 ~/
~/ is a quick way to get to your home directory. You could also type in
cp -r pico-8 /home/pi instead. Since the default login in Retropie and some other distros is user: pi password: raspberry, you might want to change the password especially if you are using ssh. To do that, type
When you have a USB SD card reader plugged into your Raspberry Pi, you will want to note where the SD cards will be mounted. If you type in
sudo fdisk -l you will see where things are mounted. In my case, its mounted as /dev/sdb1, but it might be different for you. In Retropie, it automatically mounts my SD card cartridges in /media/usb0, but if you aren't using Retropie, you might have to make the OS auto mount the cartridges. To test to see if your SD card is recognized by the OS, you will want to copy a game onto a SD card from another PC. On the Pi, if you go to /media/usb0, you should see your game located there.
Next, you will want to create a file in your home directory called
autorunpico8.sh This file will make your Pi look for a game on your SD card cartridges.
This is the script I have created.
This is a simple script that looks for a game on a SD card cartridge when you turn on the Pi. I haven't figured out how to get multicart games to work. This is a simple if statement that looks for a file in a specific location. If it finds it, it has PICO8 run that file, and if it doesn't find it, then it just makes PICO8 run splore. If your distro puts your SD card cartridges into a different directory than /media/usb0, then you will want to change that in the script. Once you are done saving the file, you will want to make it an executable by typing chmod +x autorunpico8.sh
Next, you will want to go into /etc and edit rc.local by typing in
sudo nano rc.local
This is what I have in my rc.local file
Once you save everything, try seeing if this works. When you turn on your console, you should see booting from cartridge. If it says booting from Splore, make sure the OS is mounting the SD card cartridges properly. If it doesn't show anything, then make sure there aren't any typos in the scripts.
For those interested in making a custom cartridge. I have made a sample label that can be modified with artwork.
All the relevant scripts, STL files, etc. will be located on the Github page.
Another totally different idea is to have all the games pre-installed on the Pi, and then have a QR code (or NFC chip) on the cartridge that will tell the Pi which game to run.
Accomplishes the same idea of having a physical cartridge make it easy to play a specific game. Slightly more difficult for loading new games, but overall less technically complex (maybe?).
I love the idea of having physical cartridges to flip through.
Kind of like this, but with physical cartridges that would load a game:
What I could do is use 3.5inch floppies that have a 1.44mb capacity (IBM formatted). They seem to be readily available on Amazon. I can get 10 floppies for roughly 15 bucks bucks and I was able to get Pico 8 games to run on floppy pretty much the same way as the SD cards. The down side is that floppies can get corrupted more easier than other media.
Yes, @grhmhome. They could get corrupted.
However if you are only looking for
*.p8.png files on these 3 & 1/2 inch floppies and are looking for NO OTHER files, then it doesn't matter if there are EXE or COM viruses on it, they would be ignored.
Of course for added safety you could do a preboot where every single file that is not
*.txt on that floppy would be promptly deleted before a menu even appears.
Also at 1.44mb precisely you could store exactly 18
p8 games at 80k each. Certainly more than enough for a multi-cart.
I could always redesign to add a floppy drive instead of a cartridge slot. My original version when I first started this project months ago was to have a USB floppy drive. This would make it where you would not need to print plastic shells, just slap on a label on your favorite blank IBM formatted floppy (FAT16) and you'd be good to go. I posted another thread about experimenting with floppies. It worked, but I didn't know which direction I wanted to go. Part of the reason I went with using a SD card cartridge system was because people could use the cartridges on the go with my handheld project or at home on their TV. Any idea is welcome, so I can always try both and see which one will be the better choice, but I could try other physical media too.
I made a 3.5" floppy disk version. Would you people like this instead of SD cards? I could do either or try another physical format. Floppies seem more cheaper than SD cards, but both work. This case design uses a USB floppy drive. This is the one I own and designed the new concept around. https://www.amazon.com/External-Portable-Windows-Dustproof-Scratch-Resistant/dp/B00WSW1YXA/
I made a video of the new changes in the new prototype. People can still vote if they want to see a floppy drive or cartridge system as the primary way to play. https://www.youtube.com/watch?v=-eztcAjZkTo
Solved the multicart issue. Pico 8 games that rely on multiple cart files will work on a single floppy or SD card cartridge. If a game doesn't automatically load, it will boot directly into splore, where you can find the cartridge files on the SD card. I will update the github page.
I don't have a final design yet. Added mount holes for the Raspberry Pi 3b+. I will add a script that will look in the boot partition of the Raspberry Pi for a Pico8 directory or TIC-80 directory. This will allow the console to work 100% offline. Basically, you would be able to put Pico8 onto your micro-sd card and the system will copy the directory to your home directory. This will allow you to update to the latest version of Pico8 without needing ssh. In the end, I want to have a distro that automates the whole console setup. All someone would have to do is take a copy of Pico8 or TIC-80 and copy it to the boot partition of their SD card and the system will setup everything.
Thanks. I'm printing the new case with the diagonal groves with a beige filament. This is not the final case design.
The OS will now look for a TIC-80 game on floppy. If it doesn't find one, it will look for a Pico8 game on floppy instead. If it doesn't find one, it will just display a image telling you to insert a floppy. If you exit a fantasy console, it will display the same image.
I changed the design of the case. I'm also making the controller port holes much larger. Originally I had to trim the rubber around the USB extenders because the power and reset switches were taking up too much space. Now there is no need to cut the USB extenders.
You are coming further and further along, @grhmhome. Will this consoles be available for others to purchase including the disks with the games ?
If it hooks up to my TV and everything else looks good about it, reasonably priced, you have a customer here. :)
Will you be considering PATREON for support ?
I don't plan on selling the console as a complete kit, but I'm thinking of 3D printing and selling the case, once I am done. If others want to sell 3D printed cases or modify the case, or even sell as a full kit, that is fine by me. The only thing I ask people not to do is pirate PICO8. The OS will allow people to copy PICO8 and/or TIC-80 to the boot partition and the OS will copy it over to the main Linux partition to the home directory. This allows people to update to the latest versions of PICO8 or TIC80 while remaining offline.
Also, there will be a config file in the boot partition that can me modified to allow for the system to boot only into PICO8, or only into TIC-80, or both. If set to online mode, the console will load Splore for PICO8 if there is no floppy inserted or Surf for TIC-80. If offline is set to true, then if there is no floppy inserted, then a error screen will appear if there is no floppy inserted.
Edit: I also plan on recording a tutorial on how people can put their own games onto floppy so they can sell them as physical releases.
Edit again: What people could do is sell games as floppy and add custom game boxes with game manuals, but I'm not sure how to make custom retail game boxes.
Well now that sounds nothing short of awesome, @grhmhome.
It's a shame you won't be marketing but perhaps someone can contact you with strong business sense and see the need for a Pico-8 console that hooks up to televisions - and provide.
Can you imagine. Having a box for each of the individual 3 & 1/2 inch disks and a full color manual can be tucked in for each of them, especially to aid information for such complex games as Pico-Monsters and the like.
I would definitely pay for and support a system and device such as this.
This is an updated version of my TV console with proper mounting holes for the Pi 3(and maybe Pi 4). I think the last thing I need to do is maybe add a IO plate that can be glued in. I will also try to make the OS feel more like a console OS by hiding the terminal except for debugging purposes. Right now, I have it set up where if you want to update to a new version of PICO 8, you just have to remove the micro SD card, plop in a new version of PICO 8 and its done, but PICO 8 ends up being located in the /boot directory. I could add a bash script were you put PICO 8 on the micro SD card then it gets moved to your /home directory
The front USB ports are controller ports and they just need to be glued into place.
[Please log in to post a comment]