Close
0%
0%

Game Card

A $15 game console the size of a business card that plays multiple games via cartridges.

Similar projects worth following
The Game-Card is game console with the dimensions of a typical business card (3.5x2").

Unlike most small Arduino game consoles, the Game Card ALSO plays multiple games without having to re-flash the system, i.e. it's actually a console, unlike the others which are really just one game.

It has two parts: the card itself and the cartridge. The console is simply a shell. It contains a 5-way button (though only 4 are used), additional H (Higher) and L (Lower) buttons similar to the original GameBoy, and an OLED display. The shell is also used for powering the MCU through from a CR2302. The cartridges plug into the port on the bottom of the card to gain access to the IO, and they contain the actual MCUs with the flashed games, using the ATtiny84A.

A more powerful MCU could theoretically be used in carts to expand the functionality. For instance, multiplayer carts could attach some sort of connection port

Final cost is around $15 for the Game Card itself and $1 per game

Video Demonstration


Top Level

At a top level view, the system takes input through buttons, provides output to the OLED, gets power through a battery, and receives program data and processing through an attachable MCU.

I've provided the board files and parts lists that can be uploaded to Mouser to be able to build the card and the cartridges. The only thing no able to be ordered from them is the OLED display. I've found a link on Amazon selling them for decent cost though: https://www.amazon.com/gp/product/B085WCRS7C/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1. Note that the VCC and GND are switched on these, so you'll have to reverse them with wires or something instead of just using the pin headers that comes with them.

Input System

The input system is currently 6 buttons, 4 of the buttons of a 5-way switch for directional input and 2 extra buttons.

In the code these are funneled into a ButtonController class which implements a Controller interface. These abstract the input system from the hardware implementation. The code provides an enum class and an "isPressed" function, so games can be made independent of console implementation. As long as the implemented class uses Up, Down, Left, Right, H, and L, any hardware system could be made to work.

I use H and L because I don't have caps for the buttons, and different people will think A and B mean different things, so I use H for the High non-directional button and L for the Low one.

Display

The game card display uses the SSD1306 128x64 pixel OLED currently, but at the top level, this also uses an abstraction.

Different companies make the pinout for these screens different from others as stated above. The correct board order is (Left to Right) GND, VCC, SCL, SDA, so have caution when ordering this part, so you don't have to do a switcheroo wiring like I did.

There's an interface called Display which has 3 functions: putTile which draws a single 8x8 sprite, putQuadTile which places a tile and background tiles, and fill which fills or clears the entire screen. As long as the display implementation utilizes these, any display could be used in the code.

The Power System

The entire system can run on 3V, so the gamecard is set up to simply connect directly to a CR2302 coin cell battery. On this single battery, the system can run for around 3 hours.

It will also accept 5V, so that could have been used. If you don't want to use the coin cell, there's two pins for power and ground that can be used instead.

Gallery Pictures

The pictures shown in the gallery are as follows: Final board with game inserted, Penultimate board with debug wires to connect to cartridge, 2nd board design, 2nd board prototype, 1st board design, and 1st prototype. It's like going backwards through time.

Game Card Eagle Files.zip

The Eagle project containing both the Card and Cartridge Schematics for ordering the PCB

x-zip-compressed - 406.32 kB - 08/05/2021 at 14:23

Download

Game Card Libraries.zip

The display and controller libraries for the Game Card. NEEDED FOR THE GAMES ZIP TO WORK! Available in git repo as well.

x-zip-compressed - 4.00 kB - 08/05/2021 at 03:02

Download

Game Card Games.zip

Snek and Ping, two clones of simple games for uploading to cartridges. Available in git repo as well.

x-zip-compressed - 6.61 kB - 08/05/2021 at 03:01

Download

Game Card Game Mouser Order.xls

The uploadable order form for the parts needed for the cartridges (save header and PCB)

ms-excel - 18.50 kB - 07/28/2021 at 15:54

Download

Game Card Mouser Order.xls

The uploadable order form for the parts for the Game Card itself (save the I2C OLED display, PCB, and headers)

ms-excel - 19.50 kB - 07/28/2021 at 15:25

Download

  • 1 × Game-Card PCB $0.80
  • 1 × 128x64 I2C OLED $3.62
  • 2 × Push-Buttons $0.33
  • 1 × 5-way Button $1.95
  • 8 × Resistors $0.58

View all 8 components

  • Code Improvements

    Dylan Turner08/17/2021 at 21:49 0 comments

    Two things:

    1.  I've improved the speed and size of the Display library by switching to TinyWireM instead of SoftwareWire. It's just a much smaller library. Instead of 40% of your code being the display library, it's now only like 25% or something.
    2. I removed the need to use the Arduino IDE for development. Instead, I added a Makefile which sets up an arduino-cli environment and allows me to do everything from compiling to burning bootloaders and uploading from VS code and a terminal, meaning I also don't need to copy the libraries over into my Arduino libraries folder to update them. Everything is self-contained in the repo which makes further development faster and easier.

  • Completion

    Dylan Turner08/11/2021 at 19:10 0 comments

    It's been a fun 9 months, but this project is complete.

    The final boards have been received and they function admirably.

    I'll make a video on YouTube soon showcasing the two games I've made and the development process.

    I hope y'all enjoy my project!

  • Final Version and Games

    Dylan Turner08/04/2021 at 22:43 0 comments

    I've gotten in what I believe to be the last revision of the boards before the final.

    Cartridges are completely done, so now I'm waiting on the final version of the Cards which will have the built-in power supply storage system.

    Along with that, I've completed both a Pong clone and a Snake clone for the system and tested them on my prototype. You can see the code for the games as well as some documentation on programming the cartridges at the Github site.

    When I get the final board revisions in, the project will be complete!

  • CR2302 Usage

    Dylan Turner07/28/2021 at 14:10 0 comments

    I found out that apparently this entire thing can run at 3V off of a CR2302 coin cell for several hours, so I've decided to use that as the primary power source.

    Board revisions are on the way!

  • V3 PCB

    Dylan Turner07/20/2021 at 05:35 0 comments

    Today I developed the version 3 PCB which uses the new Shell + MCU on Cartridge design.


    Here's the pic for those:

    I've selected the MCU used as well - ATtiny84A. It's the cheapest MCU I'll be able to utilize for this project. It's also surface mount, something I'll have to learn to do lol.

    I've ordered them, so now I have to wait till I get all the parts.

  • Simplification

    Dylan Turner07/07/2021 at 20:39 0 comments

    I realized that I was making lots of compromises and that this board was very expensive to make due to the pi.

    I also realized that unlike most consoles and handhelds, I could get away with putting the microcontroller into the ROM and having it preflashed because that would mean the game is only like $1.

    I plan to use ATtiny84 "ROM"s which slot into the main shell (still an OLED).

    This will bring down the overall cost and complexity of the system while also boosting the performance by not using an interpreter.

    Essentially, I expect the overall system to be $5 (if I get the OLEDs from overseas) and the cartridges to be $1 each.

View all 6 project logs

  • 1
    Get the PCBs

    Order the PCBs from the links I've provided

  • 2
    Assemble the PCBs

    Attach components in their designated slots and solder.

  • 3
    Burn the Arduino Bootloader to any cartridges

    Follow the instructions on the Github's README to burn the bootloader

View all 4 instructions

Enjoy this project?

Share

Discussions

Jeremy wrote 10/15/2021 at 16:01 point

For what it's worth you could use build a custom board around the RP2040 chip if an off the shelf RPi Pico adds too much cost/bulk.

  Are you sure? yes | no

Matthew Begg wrote 08/20/2021 at 10:30 point

Great execution of this concept. I'd started something similar as a TV-based console using the Arduino TVout library where the 'console' itself just handled the connections to the TV and controllers and the cartridges had Arduino Nanos inside them. I actually built the whole thing out of LEGO so it had a chunky retro feel. But I never finished it, and it was never as neat as your handheld solution. I wonder how easy it would be to use an RP2040 chip on a cartridge with your system? Would be really powerful.

  Are you sure? yes | no

dearuserhron wrote 07/28/2021 at 14:33 point

Like it.

I have a strange idea of making other similar devices to communicate and exchange games. It will be hard to make one game written for one device to run on another.

  Are you sure? yes | no

Jeremy wrote 10/15/2021 at 16:04 point

That problem has been solved before by implementing a virtual machine and targeting the games at that. A lot of classic interactive fiction games (e.g. Zork) were made that way.

All you need for that approach is to create an implementation of the VM for each platform and then you can play all the games.

That's basically the same idea behind Pico-8.

-----

The same basic idea can be achieve for a typical microcontroller by using a    libray/API. You still have to compile once per platform, but as long as each system meets the minimum functionality requirements and exposes it via the same API you're good.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates