The GameTank Is The Latest And Greatest 8-bit Game Console

The NES, Atari 2600, the Apple II, the Commodore 64 and the TurboGrafx-16 are just some of the many game consoles and home computers built around the 6502 CPU. And while the 6502 has been pretty much obsolete since the mid-’90s, that hasn’t stopped hackers from building new systems with it in the 21st century. Today we can even show you an entirely new 6502-based game console: the GameTank, designed and built by [Clyde Shaffer].

The GameTank was designed to be easy to build by anyone, and is therefore largely constructed from DIP chips that can be bought new at any component distributor. The main CPU is a WD65C02 running at 3.5 MHz, assisted by a 6522 I/O controller and 32 kB of RAM. Composite video is generated by a clever circuit made out of discrete logic chips. The video card comes with DMA for fast transfers and even includes a blitter, which enables it to move images around the screen quickly without loading the CPU.

For the controllers, [Clyde] decided to go for the more-or-less industry standard DE-9 connector gamepads as used on the Sega Genesis and various Atari consoles. He also made his own controller, a 3D printed one with four directional buttons, three action buttons and a start button. The buttons are implemented with Cherry MX Clear switches — an unusual choice for a gamepad perhaps, but they’re apparently very comfortable for long gaming sessions.

The console itself is also housed in a printed enclosure with a design reminiscent of the Nintendo 64. Game cartridges are inserted at the top and contain an EEPROM chip that can be written with a special programmer. The cartridge port also brings out several internal signals and can therefore be used as an expansion port, similar to the way Super NES cartridges could accommodate enhancement chips.

Games currently available include Tetris, the office-themed platformer Cubicle Knight, a Zelda-style adventure named Accursed Fiend, and a remake of the classic viral animation Bad Apple. [Clyde] provides a comprehensive stack of tools and example code and invites anyone interested to help develop more software for the platform. There’s also a hardware-accurate emulator, which is not only useful if you’re writing new code for the system but also if you simply want to try out the existing games in your browser.

Rolling your own 6502 system is great fun, and we’ve seen several examples over the years: some are built with huge bundles of wire, some are come with a clever programming language, some are so tiny they fit on your wrist, and some are simply beautifully made.

Continue reading “The GameTank Is The Latest And Greatest 8-bit Game Console”

Hackaday Links Column Banner

Hackaday Links: July 24, 2022

OK, maybe that won’t buff right out. NASA has released a more detailed analysis of the damage suffered by the James Webb Space Telescope in a run-in with a micrometeoroid, and has deemed the damage “uncorrectable”. Not that any damage to JWST is correctable, at least in the sense that the Hubble Space Telescope was able to be fitted with optics to fix its precisely-yet-inaccurately-ground main mirror. JWST is far too remote for a service call, so correctability in this case refers to a combination of what can be accomplished by tweaking the shape and position of the affected mirror segment, and what can be taken care of with image processing. The damage to segment C3, as well as damage to the other segments in a total of six collisions in the half year Webb has been on station, are assessed via “wavefront sensing”, which looks at how out of phase the light coming from each mirror segment is. The damage sounds bad, and it certainly must hurt for the techs and engineers who so lovingly and painstakingly built the thing to see it dinged up already, but in the long run, this damage shouldn’t hamper Webb’s long-term science goals.

In other space news, we hear that the Perseverance rover has taken its first chunk out of the ancient river delta in Jezero Crater. The rover has been poking around looking for something interesting to sample, but everything it tried out with its abrading tool was either too brittle, too hard to get at, or scientifically dull. Eventually the rover found a good spot to drill, and managed to bring up a 6.7-cm core sample. This makes the tenth core sample collected overall, and the first from the delta area, which is thought to have the best chance to contain evidence of ancient Martian life.

Closer to home, we’ve all likely heard of robotic surgery, but the image that conjures up doesn’t really comport with reality. Robot-assisted surgery is probably a better term, since surgical robots are generally just ultra-precise remote manipulators that are guided by a skilled surgeon. But if a study on surgery robot performance is any indication, the days of human surgeons might be numbered. The study compared accuracy and speed of both a human surgeon controlling a standard Da Vinci surgical robot and an autonomous version of the robot alone, using a depth camera for sensing. Using a standard surgical skills test, the autonomous system matched the human surgeons in terms of failures — thankfully, no “oopsies” for either — but bested the humans in speed and positional accuracy. It’ll probably be a while before fully autonomous surgeons are a thing, but we wouldn’t be betting against it in the long run.

Most readers will no doubt have heard the exciting news that Supercon will be back this year as an in-person event! Make sure you set aside the first weekend in November to make the pilgrimage to Pasadena — it’ll be great seeing everyone again after the long absence. But if you just can’t wait till November for an IRL con, consider dropping by SCALE 19X, coming up this week in Los Angeles. The Southern California Linux Expo is being held July 28 through 31, and features a ton of speakers, including a keynote by Vint Cerf. Hackaday readers can save 50% on tickets with promo code HACK.

And finally, as a lover of Easter eggs of all kinds, but specifically of the hidden message in software variety, we appreciated this ode to the Easter egg, the embedded artistry that has served as a creative outlet for programmers over the years. The article lists a few great examples of the art form, along with explaining why they’re actually important artifacts of the tech world and what they’re good for. We tried out a few of the ones listed in the article that we hadn’t heard of before; some hits, some misses, but they’re all appreciated. Well, most of them — the corporate rah-rah kind can bugger straight off as far as we’re concerned.

Ortur Laser Will Go Open-Source

Well, that was fast! Last week, we wrote about a video by [Norbert Heinz] where he called out the Ortur laser engravers for apparently using the GPL-licensed grbl firmware without providing the source code and their modifications to it, as required by the license. Because open source and grbl are dear to our hearts and CNC machines, we wrote again about Norbert’s efforts over the weekend, speculating that it might just be unfamiliarity with the open source license requirements on Ortur’s part.

Because of [Norbert]’s persistance and publicity around the issue, the support ticket finally reached the right person within Ortur, and within two or three days [Gil Araújo], Support Admin at Ortur, managed to convince the company that going fully open source was the right thing to do. What remains is the question of how to do it, operationally.

So [Gil] asked [Norbert] to ask Hackaday: what do you want from Ortur on this, and how should they proceed? Via e-mail, he asked in particular for best practices on setting up the repository and making the code actually useful to non-programmer types. He said that he looked around at the other laser engraver companies, and didn’t find any good examples of others doing the Right Thing™, so he asked [Norbert] to ask us. And now we’re asking you!

Have you got any good examples of companies using open-source firmware, modifying it, and making it available for their users? Is a simple Github repo with a README enough, or should he spend some time on making it user-friendly for the non-coders out there? Or start with the former and work toward the latter as a goal? I’m sure [Gil] will be reading the comments, so be constructive! You’ll be helping a laser engraver company take its first steps into actually engaging with the open source community.

We said it before, and we’ll say it again. Good job [Norbert] for taking Ortur to task here, but also by doing so in a way that leaves them the option of turning around and doing the right thing. This also highlights that companies aren’t monolithic beasts – sometimes it takes getting your cause heard by just the right person within a company to change the response from a “this is a business secret” to “how should we set up our Github?” And kudos for [Gil] and Ortur for listening to their users!

Impatience Is A Virtue When Testing This Old Maritime Teleprinter

[Larry Wall], inventor of Perl, once famously said that programmers have three key virtues: sloth, hubris, and impatience. It’s safe to say that these personality quirks are also present in some measure in most hardware hackers, too, with impatience being perhaps the prime driver of great hacks. Life’s too short to wait for someone else to build it, whatever it may be.

Impatience certainly came into play for [Sebastian (AI5GW)] while hacking a NAVTEX receiver (in German). The NAVTEX system allows ships at sea to receive text broadcast alerts for things like changes in the weather or hazards to navigation. The trouble is, each NAVTEX station only transmits once every four hours, making tests of the teleprinter impractical. So [Sebastian]’s solution was to essentially create his own NAVTEX transmitter.

Job one was to understand the NAVTEX protocol, which is a 100-baud, FSK-modulated signal with characters encoded in CCIR 476. Since this encoding is also used in amateur radio teletype operations, [Sebastian] figured there would surely be an Arduino library for encoding and decoding it. Surprisingly, there wasn’t, but there is now, allowing an Arduino to produce the correct sequence of pulses for a CCIR 476-encoded message. Fed into a function generator, the mini-NAVTEX station’s signal was easily received and recorded by the painfully slow teleprinter. There’s that impatience again.

We thought this was a neat hack, and we especially appreciate that [Sebastian]’s efforts resulted in a library that could be useful to hams and other radio enthusiasts in the future. We’ve talked about some more modern amateur radio digital modes, like WSPR and FT8, but maybe it’s time to look at some other modes, too.

Continue reading “Impatience Is A Virtue When Testing This Old Maritime Teleprinter”

ICEBlaster: A Drag’n’Drop Bitstream Loader For ICE40

The iCE40 series of FPGAs gets a fair bit of coverage on these pages, largely due to its accessibility (thanks to huge efforts in reverse engineering and open tool chains) and likely also due to Lattice Semiconductors’ attitude to open source in general. Whilst these devices are small and rather limited, you can’t really beat them for a first foray into the subject. They’re plenty beefy enough for many of the simpler FPGA applications. [TinLethax] over on Hackaday.IO has plenty of experience with the devices, and has added another tool to our collective iCE40 arsenal, namely iCEBlaster, a USB mass storage device (MSC) style bootloader for drag-n-drop bitstream loading. The days of needing dedicated special programmers are starting to be numbered, with many chips now presenting a USB mass storage device to the host in order to upload the firmware image.

FPGAs don’t tend to operate this way, needing a device-specific bitstream loading upon start-up, which (unless they have OTP memory) is usually the job of an external configuration memory. iCEBlaster (a play on the Xilinx ByteBlaster programmer, maybe?) runs on the STM32F4xx series devices at least, but should be easily portable to others. The idea is pretty straightforward — dragging a new bitstream file onto the storage device initiates an FPGA target reset, which in turn allows the STM32 to send the bitstream over to the iCE40 via the SPI interface. Nothing more than that.

If you’ve been looking to get into the iCE40, this guide might be a good starting point, and every learning experience needs a good project to drive it, how about running Doom on a softcore RISC-V?

Linux Fu: Docking Made Easy

Most computer operating systems suffer from some version of “DLL hell” — a decidedly Windows term, but the concept applies across the board. Consider doing embedded development which usually takes a few specialized tools. You write your embedded system code, ship it off, and forget about it for a few years. Then, the end-user wants a change. Too bad the compiler you used requires some library that has changed so it no longer works. Oh, and the device programmer needs an older version of the USB library. The Python build tools use Python 2 but your system has moved on. If the tools you need aren’t on the computer anymore, you may have trouble finding the install media and getting it to work. Worse still if you don’t even have the right kind of computer for it anymore.

One way to address this is to encapsulate all of your development projects in a virtual machine. Then you can save the virtual machine and it includes an operating system, all the right libraries, and basically is a snapshot of how the project was that you can reconstitute at any time and on nearly any computer.

In theory, that’s great, but it is a lot of work and a lot of storage. You need to install an operating system and all the tools. Sure, you can get an appliance image, but if you work on many projects, you will have a bunch of copies of the very same thing cluttering things up. You’ll also need to keep all those copies up-to-date if you need to update things which — granted — is sort of what you are probably trying to avoid, but sometimes you must.

Docker is a bit lighter weight than a virtual machine. You still run your system’s normal kernel, but essentially you can have a virtual environment running in an instant on top of that kernel. What’s more, Docker only stores the differences between things. So if you have ten copies of an operating system, you’ll only store it once plus small differences for each instance.

The downside is that it is a bit tough to configure. You need to map storage and set up networking, among other things. I recently ran into a project called Dock that tries to make the common cases easier so you can quickly just spin up a docker instance to do some work without any real configuration. I made a few minor changes to it and forked the project, but, for now, the origin has synced up with my fork so you can stick with the original link.

Continue reading “Linux Fu: Docking Made Easy”

Swapped ROM Revives Ailing HP-48S Calculator

Buying broken gear for cheap is time honored hacker tradition, and while we might not always be successful in reviving it, rarely do we come away empty handed. There’s always parts to salvage, and you can’t put a price on the knowledge to be gained when poking around inside an interesting piece of hardware. So we’re not surprised at all to hear that [Tomas Pavlovic] jumped at the chance to grab this faulty HP-48S calculator for a couple bucks.

Luckily for us, the story doesn’t end at the bottom of his parts bin. When he got the HP-48S back home, he immediately set out to see if it could be repaired. After changing out a few choice components and not seeing any result in the device’s behavior, he became suspicious that the problem may be with the firmware; specifically, the soldered-on chip that holds it.

Dumping the original ROM.

After carefully lifting the NEC uPD23C2000GC from its resting place for the last 30 years or so, he wired up an adapter that let him connect the chip to his programmer so its contents could be dumped. Rather than trying to find another ROM chip, he decided to wire in a socket and found a re-writable SST39SF040 that could stand in as a replacement. Flashing a fresh copy of the firmware to the new socketed chip got the calculator up and running again, with the added bonus of allowing [Tomas] to pull the chip and flash a different firmware version should he care to experiment a bit.

Now, we know what you’re thinking. Where was the fix? What exactly brought this piece of 1990s gear back to life? That part, unfortunately, isn’t very clear. You’d think if the original ROM chip was somehow faulty, [Tomas] wouldn’t have been able to so easily pull a valid firmware image from it. That leaves us with some pretty mundane possibilities, such as a bad solder joint on the chip’s pins. If that was indeed the case, this fix could have been as simple as running a hot iron over the pins…but of course, where’s the fun in that?

Update: We heard back from [Tomas], and it turns out that when compared to a known good copy, the dumped firmware did have a few swapped bits. His theory is that the NEC chip is in some weird failure mode where the calculator wouldn’t run, but it was still functional enough to get most of the content off of it. What do you think? Let us know in the comments.