We’ll all be familiar with Tic-Tac-Toe, or Noughts and Crosses, a childhood pencil-and-paper diversion which has formed the basis of many a coding exercise. It’s an easy enough task to implement in software, but how many of us have seen it done in hardware alone? That’s just what [Warren Toomey] has done using TTL chips, and his method makes for a surprisingly simple circuit.
At its heart is an 8 kB ROM that contains precomputed move sequences that are selected via an address composed of the game states for both player and machine. A series of flip-flops control and buttons to make the board, and a 555 provides a clock.
The technique of using a ROM to replace complex logic is a very powerful one that is facilitated by the low price of relatively large devices that would once have been unaffordable. We’ve seen the technique used elsewhere, including as an ALU in a TTL CPU, and even for an entire CPU in its own right.
You can see the result in operation in the video below the break, and should you wish to have a go for yourself all the relevant information can be found in a GitHub repository.
The memory for this chip is an AT28C64, a 64 kilobit or 8 kilobyte steamed RAM. You call it a steamed RAM despite the fact that it is obviously a ROM. There is no microcontroller on this board or really anything resembling programmable logic. Everything is just logic chips. This board displays a 256×256 1 bit per pixel image over composite video. The sync is generated with the help of a 14MHz crystal and some circuitry taken from the original PONG board. Other than that, it’s just a bunch of NANDs and ORs that roll through the address space of the ROM and spit values out over a composite video port.
The build began by breadboarding everything save for a nifty solderless breadboard power adapter. Three ROM chips were programmed with different images — a cat, something to do with vaporwave, and some guy that looks like the poster from Eraserhead. Everything worked on the breadboard — yes, even at 14 MHz — so the build moved on to a printed circuit board.
A factory is a machine. It takes a fixed set of inputs – circuit boards, plastic enclosures, optimism – and produces a fixed set of outputs in the form of assembled products. Sometimes it is comprised of real machines (see any recent video of a Tesla assembly line) but more often it’s a mixture of mechanical machines and meaty humans working together. Regardless of the exact balance the factory machine is conceived of by a production engineer and goes through the same design, iteration, polish cycle that the rest of the product does (in this sense product development is somewhat fractal). Last year [Michael Ossmann] had a surprise production problem which is both a chilling tale of a nasty hardware bug and a great reminder of how fragile manufacturing can be. It’s a natural fit for this year’s theme of going to production.
The saga begins with [Michael] receiving an urgent message from the factory that an existing product which had been in production for years was failing at such a high rate that they had stopped the production line. There are few worse notes to get from a factory! The issue was apparently “failure to program” and Great Scott Gadgets immediately requested samples from their manufacturer to debug. What follows is a carefully described and very educational debug session from hell, involving reverse engineering ROMs, probing errant voltage rails, and large sample sizes. [Michael] doesn’t give us a sense for how long it took to isolate but given how minute the root cause was we’d bet that it was a long, long time.
The post stands alone as an exemplar for debugging nasty hardware glitches, but we’d like to call attention to the second root cause buried near the end of the post. What stopped the manufacturer wasn’t the hardware problem so much as a process issue which had been exposed. It turned out the bug had always been reproducible in about 3% of units but the factory had never mentioned it. Why? We’d suspect that [Michael]’s guess is correct. The operators who happened to perform the failing step had discovered a workaround years ago and transparently smoothed the failure over. Then there was a staff change and the new operator started flagging the failure instead of fixing it. Arguably this is what should have been happening the entire time, but in this one tiny corner of the process the manufacturing process had been slightly deviated from. For a little more color check out episode #440.2 of the Amp Hour to hear [Chris Gammell] talk about it with [Michael]. It’s a good reminder that a product is only as reliable as the process that builds it, and that process isn’t always as reliable as it seems.
That at least seems to be the motivation behind [Morphcat Games] pending release of Micro Mages, a new game for the Nintendo Entertainment System console that takes its inspiration from Super Mario Bros. The interesting bit here is how they managed to stuff so much content into so little space. The video below goes into great detail on that, and it’s a fascinating lesson in optimization. The game logic itself is coded in assembler, which of course is far more efficient than higher level languages. Even so, that took 32 kB of ROM, leaving a mere 8 kB for background elements and foreground sprites.
Through a combination of limited sprite size, tiling of smaller sprites to make larger characters, and reusing tiles by flipping them horizontally or vertically, an impressively complete palette of animated characters was developed. Background elements were similarly deconstructed and reused, resulting in a palette of tiles used to generate all the maps for the game that takes up just 60 bytes. Turning those into playable levels involves more mirroring and some horizontal shifting of tiles, and it looks like quite an engaging playfield.
Yes, there’s a Kickstarter for the game, but we’re mainly intrigued by what it takes to cram a playable game into so little space. Don’t get us wrong – we love the Retro Pie builds too, but seeing the tricks that early game developers relied upon to make things work really gets the creative juices flowing.
Wheel of Fortune is a television game show, born in the distant year of 1975. Like many popular television properties of the era, it spawned a series of videogames on various platforms. Like many a hacker, [Chris] had been loading up the retro NES title on his Raspberry Pi when he realized that, due to the limitations of the cartridge format, he was playing the same puzzles over and over again. There was nothing for it, but to load a hex editor and get to work.
[Chris’s] initial investigation involved loading up the ROM in a hex editor and simply searching for ASCII strings of common puzzles in the game. Initial results were positive, turning up several scraps of plaintext. Eventually, it became apparent that the puzzles were stored in ASCII, but with certain most-significant-bits changed in order to mark the line breaks and ends of puzzles. [Chris] termed the format wheelscii, and developed an encoder that could turn new puzzles into the same format.
After some preliminary experimentation involving corrupting the puzzles and testing various edge cases, [Chris] decided to implement a complete fix. Puzzles were sourced from the Wheel of Fortune Puzzle Compendium, which should have plenty of fresh content for all but the most addicted viewers. A script was then created that would stuff 1000 fresh puzzles into the ROM at load time to minimize the chances of seeing duplicate puzzles.
For many of us, being given a big old DIP ROM from nearly thirty years ago and being told to retrieve its contents would be a straightforward enough task. We’d simply do what we would have done in the 1980s, and hook up its address lines to a set of ports, pull its chip select line high, and harvest what came out of the data lines for each address.
But imagine for a minute that an old-fashioned parallel ROM is a component you aren’t familiar with, as [Brad Dettmer] did with the ROM from a SNES Zelda cartridge. We’ve seen plenty of reverse engineering stories with ancient computing gear as their subject, but perhaps it’s time to accept that some of the formerly ubiquitous devices are edging towards that sort of status.
So [Brad] takes us through the process of using the Saleae logic analyser to interrogate the chip while an Arduino stepped through its address lines, and the lesson is probably that while it seems like a sledgehammer to crack a nut it is important to factor in that unfamilarity. If you’d never worked with a 1980s ROM, it would make sense to use the tool you are familiar with, wouldn’t it?
There’s something powerful about reliving the experience of using a game console from our personal good old days, especially the tactile memories stored up from hundreds of hours handling a chintzy joystick or the sound and feel of inserting a game cartridge. Emulators have their place, but they fall far short of period-correct hardware in the nostalgia department.
That’s not to say that the retro gear can’t use a little help in terms of usability, which is why [Scott M. Baker] built this Raspberry Pi multi-cartridge for his Atari 5200. The idea is to maintain the experience of the cartridge interface without having to keep stacks of cartridges around for all the games he wants to play. [Scott] leveraged the approach he used when he built a virtual floppy drive for a homebrew PC/XT: dual-port memory. The IDT7007 is a 32k chip that lives between the Atari 5200 and a Raspberry Pi Zero and can be addressed by both systems; the Pi to write ROM images to the memory, and the console to read them. He had to deal with some fussy details like chip select logic and dealing with the cartridge interlock signals, not to mention the difference in voltage between the memory chip’s logic levels and that of the Pi. Retro game-play occupies the first part of the video below; skip to 6:45 for build details.
The one quibble we have is trying to jam everything into an old cartridge. It’s critical to replicating the tactile experience, and while we don’t think we’d have gone so far as to injection mold a custom cartridge to house everything without any protrusions, we might have 3D-printed a custom cartridge instead. In the end it doesn’t detract much from the finished project, though, and we appreciate the mix of old and new tech.