If you're an indie dev or author of a game, book, film, or other production, this is where you can pitch it -- just don't be spammy!
Posts: 5
Joined: Fri Jun 05, 2020 3:46 am

A homebrew, simple, open source, retro-game VGA console

by nicw Fri Jun 19, 2020 7:43 am

Hi there!

I would like to show some progress about the open-source project I’m working on!

As the title says, it is an open-source retro-game console that connects to VGA monitors.
The hardware design files are available on github (https://github.com/next-hack/usvc)!
As you can see, it is extremely simple and the schematics fits in one page!

It is based on uChip (an open source Arduino Zero compatible development board, the size of a 16-DIP IC), therefore, in a surge of fantasy, I have named it uSVC (uChip Simple VGA console). It allows everyone to code and play his own 8-bit style retro games.

The console accepts standards USB gamepads and keyboards, and has a VGA output, with up to 256 on-screen colors. Games are stored in the microSD card, and are loaded into the MCU flash by the game loader.

Everything is handled by the 48 MHz Cortex M0+ microcontroller that powers uChip (an ATSAMD21), including VGA and audio signals, which are generated using carefully optimized ASM code. Games, instead, are programmed in C. All the code has been written using the free Atmel Studio 7.0 (using GCC as C compiler).

There are for now three video modes, all working at 320 x 200 pixels. With minor modifications, you could achieve up to 320x240/400/480 pixel. Still 240/480 lines would leave too few time to the CPU (during the active video, the CPU is busy in generating the video signals). 400 and 480 vertical lines will have a pixel ratio 2:1.

The modes are:
1) A bitmapped mode with 2 bpp (though, you can change the entire palette each 8 pixels, so you can still achieve 256 onscreen colors, with some limitations). This was the first mode I developed.
2) An 8-bpp tiled mode (tiles are 8x8 pixels).
3) A 4-bpp tiled mode. In this case, you can arbitrarily change any of the palette entry on each high-res (400 lines) lines, so that you can achieve up to 256 colors in this mode too.

Tiled modes support sprites, and they can handle about 64 on-screen 8x8 sprites. Larger sprites with arbitrary sizes can be drawn and they are automatically handled by the video engine, but the maximum number of course decreases. Tile modes also support full screen X-Y arbitrary scrolling, arbitrary per-line and tile horizontal scrolling (e.g. for water deformation effect), vertical row remap (e.g. for water mirror...), and other interesting features.

Since uChip has only one 10-bit DAC channel, the audio consists of four 30kSPS 8-bit PCM channels mixed down to a mono 10-bit channel.

Here are some pictures showing some of the results :)

Bitmapped mode. Tetris! As you can see, despite there are only 2 bits per pixels, you can get many more colors.
tetris 500pix.jpg
tetris 500pix.jpg (93.61 KiB) Viewed 13828 times

8 bpp mode: a top down racing game (with weapons).
Fairplay Race 3 - 500 pix.jpg
Fairplay Race 3 - 500 pix.jpg (81.81 KiB) Viewed 13828 times

4bpp mode: a clone of the popular Worms game on the Amiga 500. Levels are randomly generated. Background, like in the original Worms game, can be destroyed, of course.
uSVC connected 500pix.jpg
uSVC connected 500pix.jpg (67 KiB) Viewed 13828 times

Sorry for the crapgraphics: I’ve lost all my creative artistic nature when I had to choose the name of uSVC...

This is the editor (sorry for the blurry pics, but all the images have been scaled to 500 pixels, to avoid messing up with page formatting).
usvcEditor-500pix.png (162.39 KiB) Viewed 13828 times

What else? uSVC has 32kB of RAM a 256kB of flash (24k of which are used by uChip’s bootloader and game loader, the latter providing also shared USB and SD functions, so that you don’t have to include them in the games). Everything is done using only 14 I/O pins :).

I’d like some feedback and critics!


PS: I will continue updating the github repository and I will upload there the sources of everything (including the editor that allows to create maps, and export graphics and sound to C files), as soon as I finish cleaning them up to a decency level :)
User avatar
Posts: 3405
Joined: Mon Nov 17, 2008 11:15 am
Location: BC, Canada

Re: A homebrew, simple, open source, retro-game VGA console

by Anapan Fri Jun 19, 2020 11:39 am

That is incredibly impressive!
Posts: 5
Joined: Fri Jun 05, 2020 3:46 am

Re: A homebrew, simple, open source, retro-game VGA console

by nicw Fri Oct 23, 2020 7:05 am

Hi there!

I have published the source of the game map editor (See the github download link here https://next-hack.com/index.php/2020/09 ... ap-editor/. In the same page, there is a short introduction and guide).

A crowdsupply campaign has been set up https://www.crowdsupply.com/itaca-innovation/usvc, but you can freely download the project (see first post) and build it on your own! (Still, it will hardly cost less that the price you can get from Crowdsupply, I'm afraid.)

Source code of games and firmware will be released in the following weeks!

Warning: some basic soldering skills will be required!


Return to Creator's Corner

Who is online

Users browsing this forum: No registered users and 1 guest