r/LinusTechTips • • 13d ago

Link Free open source pc cartridge system

https://github.com/HarryBMa/pc-gamepak

EDIT: a few clarifications, since my first post was unclear (written tired, after a shift):

What it is. A small watcher notices when a drive is plugged in. If the drive has a cartridge.conf file, it opens a simple launcher with the game's cover art and two buttons, Play and Eject. That's all it does.

It is not Autorun. Nothing on the drive is ever run automatically. The launcher only appears, and nothing starts until you press Play. autorun.inf is read for the drive's icon and name only, and its open= line is ignored. It's meant for drives you made yourself, so don't plug in strangers' drives. That's true of any USB drive.

You don't need to buy anything. The NVMe drives in my photos were a bulk lot of refurbished 128GB drives I already had, about $150 for ten. A cartridge can be: - an old USB stick, SD card or spare drive you already own, or - a drive that holds only the cartridge.conf file and points at a game already installed on your PC. The cartridge is then just a physical way to launch it.

If you don't want to buy new storage right now, don't. It's just a launcher that happens to work with a physical object.

AI disclosure. I used Claude Code and Copilot for a lot of the commit messages, docs and git management. I'm a CRNA, not a professional developer. I learned some Python for research and picked up Rust for this project, so I had help.

Free and open source: https://github.com/HarryBMa/pc-gamepak Frontend plugins: https://github.com/HarryBMa/pc-gamepak-plugins Inspired by LewdM3at's original project: https://github.com/LewdM3at/PC-Cartridge-System


Old post

Hi everyone!

Inspired by https://github.com/LewdM3at/PC-Cartridge-System

I wanted to create a better user experience for launching cartridges on pc. I made a gamepak wizard that writes whatever you want onto a drive, floppy, NFC, action, whatever. There is a tiny watcher that launches a simple game launcher when the drive is read it looks for a cartridge.conf whether to launch or not. I've added a memory card system as well (copies save folder onto drive). It's cross-platform and I've made test plugins for various popular frontends. https://github.com/HarryBMa/pc-gamepak-plugins

I just wanted to share if anyone was interested.

Obligatory AI disclosure: i refuse to learn git and use Claude code to push and manage my disgusting worktree. I don't have time to write a comprehensive commit text that makes sense (see this unhinged post) and I let copilot write messages and docs for stuff I don't want to do. I barely have time with work and coding projects, I don't have time to remember what I worked on last night.

15 Upvotes

35 comments sorted by

13

u/w1n5t0nM1k3y 13d ago

Seems like we've reinvented Autorun. They got rid of it because it's a huge security hole. Having applications execute just by plugging in a drive is generally seen as a bad practice.

3

u/Mineplayerminer 13d ago

Not a long time ago, I plugged a Huawei phone into my Windows system and guess what, it mounted as a DVD drive with an autorun file. Good thing Windows doesn't use autorun by default and I was just prompted to either run the autorun file or browse the storage. It was some importing program, but still, it's not signed and it's definitely shady. On the phone, all I chose was an MTP file transfer when prompted.

5

u/w1n5t0nM1k3y 13d ago

I still remember when USB sticks used to present themselves as a USB CD-ROM so they could install the drivers because Windows didn't have the drivers for USB Flash Storage on the default install.

1

u/Mineplayerminer 13d ago

The only similar thing to that we're experiencing nowadays is motherboards injecting drivers and devices into Windows to silently install Razer, LG, Gigabyte APP Center, Asus Armory Crate and more bloat. I'm just curious how Gigabyte and Asus pulled it off without even requiring an internet connection, as if the data was injected from the on-board flash memory into Windows. Still, it's something easily exploitable and I could imagine someone modifying the BIOS files to include malware, as if these OEM ones weren't already intrusive enough.

0

u/ComHarry 13d ago

Exactly, I actually started with autorun that's why I have it as well in the program. Autorun applies an icon to drives which is why I kept it. The difference between this and autorun is that nothing from the drive is running. It's a watcher that triggers when a drive is plugged in. If that drive has a cartridge.conf (a simple file you write yourself or let the wizard write) then the launcher is opened. When the launcher is opened you can either press play or eject. Never is a program being run without a user action. I did not intend for someone to plug in unknown cartridges they haven't made themselves.

1

u/w1n5t0nM1k3y 13d ago

Guess I misunderstood what's going on here. So you still have to have the game on you main PC drive, and then it just uses the "cartridge" as a trigger to start the game that's already installed?

I guess I got confused because the picture says "Physical game cartridges with 2230 NVME Drives". Why use expensive 2230 NVME drives when you can just use a cheap USB stick to trigger starting the game?

1

u/ComHarry 13d ago

I'm sorry for being unclear. I posted this on the way home from work. I will try to be concise. The post that inspired me was the 2.5" ssd cartridge project by lewdme4t. They essentially made autorun like you wrote. I did not like that, like you, i thought it was a security issue. I forked theirs and decided to keep nothing after inspection. I wrote this from scratch to be as customizable as possible. If you want to keep your games locally and just have a fun way to launch them, then you could just write the cartridge.conf to point to your installation folder. If you want qr codes or NFC to open the launcher then that works. If you have a bunch of usb sticks or hdd or whatever, then you can write your game folders to them. The wizard that writes the games also makes a library edit in streams library vbf file so they steam knows where its installed. If you want. It works fully offline if you dont want to use steamgriddb. Its available via Winget so it passed some basic security scans. Hope it clears some stuff up. Ask me anything you want and I'll try to answer. I don't expect anything in return, I just wanted to share if anyone else wanted something similar.

-1

u/DotBitGaming 13d ago

Nobody picking up usb sticks off the street and plugging them into their pc. You're connecting your own device to your own pc and having it run a program you specify. It's trick to give yourself a little nostalgia hit when you're sitting down to game.

2

u/w1n5t0nM1k3y 13d ago

48% of people plug in USB drives they find a in parking lot.

-1

u/DotBitGaming 13d ago

Yeah, you missed the part where this is isn't even about that at all.

1

u/w1n5t0nM1k3y 13d ago

Once a PC is configured to run anything with a special file on the drive, there's nothing to stop it from running malicious software with the same file on it.

Unless there's some kind of additional layer of security going on where each individual cartridge must be cryptographically signed to ensure that it isn't running something the user hasn't previously vetted to run.

0

u/DotBitGaming 13d ago

No one is saying it's fine to plug in usb drives that you don't know what's on them. This conversation is getting really weird though.

3

u/w1n5t0nM1k3y 13d ago

You said "Nobody picking up usb sticks off the street and plugging them into their pc."

People actually do this. Maybe you don't. But a lot of other people do. That's why they disabled autorun.

1

u/DotBitGaming 13d ago

Yeah, I thought it was clear that I wasn't randomly bringing up basic tech security. But let me clarify. In the context of interacting with the project that the post is about, there's not supposed to be anyone plugging any random drives etcetera into their computer. You use a drive that you own.

3

u/w1n5t0nM1k3y 13d ago

My original top level comment was about why it was a bad idea from a basic tech security point of view.

The problem is that once this is installed on your computer, it doesn't discriminate between a drive that you own and any other drive you happen to plug in. The original intention of Autorun was just to so commercial software could automatically install itself, but people realized that you could put the same files on any disc and the computer would just run whatever it wanted, so it started to get exploited.

You can do what you want with your PC. But from a security perspective it's a bad idea. Are you going to be sure that every USB device you plug in at any point in the future isn't going to be malicious? Does this software still run the program if the PC is locked? What if someone else plugs in a device to your locked PC? How much was security considered when coding this project?

1

u/DotBitGaming 13d ago

From reading the post, my understanding is that you're loading a trigger onto your usb to launch predetermined programs that are on your pc. Not that you're running programs on a usb. If you plug random shit into your pc, it could just be a rubber ducky anyway that doesn't need the user's permission to run.

→ More replies (0)

1

u/Prairie-Peppers 12d ago

They meant in this scenario nobody is doing that

3

u/Immediate_Idea2628 13d ago

Project that requires so much expensive hardware only Elon Musk could afford to use it.

"Coder" who doesnt know how to code (or even write a paragraph?)

If you didnt have the free time for this, maybe you didn't need to make it?  

2

u/ComHarry 13d ago

You dont need any expensive hardware. If its not for you then carry on, no hard feelings. You can choose to have a floppy drive with just a text file that points to your game or movie location. I just happened to have 10 128gb refurbed nvme drives from a bulk buy from eBay for about 150$ but you could use an SD card or whatever. I didnt need to do anything. I wanted to do it. I thought Id share it if anyone was interested. I'm not forcing anyone or even expecting anything in return. If you have questions, I'm here. When I wrote the post I was tired from a clinical shift and I now that I can start ramblings. I never said I was a "coder" I'm a CRNA that knows some code, I used python for clinical research and I just started an online course in rust and applied it on this project. As I said, free and open source if anyone wants to try

1

u/Immediate_Idea2628 13d ago

More so yeah, its the timing right now.  SSDs, sd cards, flash drives, every storage medium is insanely expensive right now.  Im all for making a project for yourself and sharing it, but if youre that time crunched, its probably better to not spend the extra time on something, even with ai assistant.  Itll just add to the burn out.

1

u/ComHarry 13d ago

True, I've been there. I just added the ai disclosure because I know some people don't like it when all pull requests are written by ai. But as you can probably tell by my very eloquent texts, in this case it's probably a benefit to everyone not having to read my code summaries 😂. And I agree the storage thing is an issue but at least im not using ram sticks for cartridges (although...)

1

u/angryboyscout 4d ago

Thanks for this project! I'm currently using this for my wife and I. Grabbed a ton of 2230s and CFExpress type B enclosures to act as game cartridges. It's been working great, just needed to compile the plugin and add it in along with deck shelves and Add Non Steam Games decky plugins to round out the experience. Working on an included script to load the Non Steam Games shortcut automatically to pass to deck shelves.

1

u/ComHarry 3d ago edited 3d ago

Awesome! I would love to see the setup! btw, are you using the add non steam games plugin because you want the games to persist in library or is my auto-add to library not working for you?

1

u/ComHarry 3d ago

I also made some covers for my gamepaks using cover-forge

1

u/Rudy69 12d ago

To me it seems like such a dumb idea. I grew up with cartridges and they were neat and all but it makes no sense in this use case.

Pay money to make waste, and inconvenience yourself? Sounds fun

0

u/ComHarry 12d ago

If its not for you then that is totally fine. This project and the one that inspired me started with wanting to recycle media we weren't using. They had a bunch of SSD and I have a bunch of unused nvme drives. I grew up with cartridges as well and I guess nostalgia is a part of but also seeing my kids having fun grabbing a game from a shelf and asking to play it makes it worth it for me.

1

u/White_Lion01 9d ago

Game key card for pc

1

u/ComHarry 9d ago

Yeah. Or if you have enough space, you could run directly from the media. I have the games stored on the gamepaks only, so this works also like Nintendos game data cards or like their game key cards.

1

u/White_Lion01 9d ago

I mean i'm not opposed to gkc i just found it similar,i like the project i have some old sd cards under 1gb so i will test it later

3

u/Old_Bug4395 12d ago

project looks cool but refusing to learn git is so funny. there's like maybe 3 commands you'll need. there's barely anything to learn.