Think You Know How Mario Kart Works?

In what looks like the kickoff of a fun video series, [MrL314] takes us on a quick but deep tour of how the AI in Mario Kart works. (Video, embedded below.) Don’t play much Mario Kart anymore? Well, have a look anyway because some of the very simple tricks that make Bowser pass Princess Peach without running into her might be useful in any manner of pre-programmed navigation scenarios.

Quick spoilers. The CPU players move through different zones, each with a desired speed and a vector direction field that changes the direction they should point in. Only when they run off course do they actually compute headings to their target. Setting this desired direction and speed beforehand greatly reduces the on-the-fly computation needed.

Then you throw other players into the mix, and a very simple distance-dependant turning algorithm makes for clean overtaking. This effect is hand-tweaked for the particular racecourse, though, because you don’t want Luigi driving off the thin stretches on Rainbow Road. For more technical details, you can check out [MrL314]’s notes.

If anything, this video gives us a further appreciation of the clever little hacks that create apparently complex interactions from tremendously simple rules. Remember Mario Kart when you’re programming in that next multi-gigabyte neural network model, OK?

Continue reading “Think You Know How Mario Kart Works?”

Raspberry Pi Simulates The Real Analog TV Experience

If you’ve laid hands on a retro analog TV, have the restoration bug, and you plan to make the final project at least somewhat period-correct, you face a bit of a conundrum: what are you going to watch? Sure, you can serve up just about any content digitally these days, but some programs just don’t feel right on an old TV. And even if you do get suitably retro programming, streaming isn’t quite the same as the experience of tuning your way through the somewhat meager selections as we did back in the analog days.

But don’t worry — this Raspberry Pi TV simulator can make your streaming experience just like the analog TV experience of yore. It comes to us from [Rodrigo], who found a slightly abused 5″ black-and-white portable TV that was just right for the modification. The battery compartment underneath the set made the perfect place to mount a Pi, which takes care of streaming a variety of old movies and shorts. The position of the original tuning potentiometer is read by an Arduino, which tells the Pi which “channel” you’re currently tuned to.

Composite video is fed from the Pi’s output right into the TV’s video input, and the image quality is just about what you’d expect. But for our money, the thing that really sells this is the use of a relay to switch the TV’s tuner back into the circuit for a short bit between channel changes. This gives a realistic burst of static and snow, just like we endured in the old days. Hats off to [Rodrigo] for capturing everything that was awful about TV back in the day — Mesa of Lost Women, indeed! — but still managing to make it look good.

Continue reading “Raspberry Pi Simulates The Real Analog TV Experience”

Will MiSTer Fool You Into Learning FPGAs?

What’s the killer app for FPGAs? For some people, the allure is the ultra-high data throughput for parallelizable tasks, which can enable some pretty gnarly projects. But what if you’re just starting out? How about 1980s style video games?

The MiSTer FPGA project created a bit of FPGA hardware that makes it easy to build essentially any old school video game or computer platform. That’s a massive clean slate. Of course, you can simply download someone else’s Atari ST or Commodore 64 setup and load it up, but if you want to learn FPGAs while recreating old-school video game machines, you’re going to want to get your hands dirty.

[Mister Retro Wolf] started up a video series last winter (trailer embedded below) where he’s embarked on a project to recreate a classic video game machine from the ground up using the MiSTer FPGA platform. In particular, he’s going to recreate the Namco Tank Battalion arcade game, from the schematics, in Verilog.

This is literally building a 6502-based video game machine from scratch (in gateware), so if you’re interested in retrocomputing or FPGAs, you’ll have something to learn here. He’s gotten through the CPU, screen, tilemap graphics, and memory so far, but it’s not done yet. To follow along, get yourself some hardware and you can probably catch up.

We’ve covered the MiSTer FPGA project before, of course, because we think it’s cool. And if a video game arcade machine is going to be your gateway drug into the seedy world of programmable gates, then so be it.

Continue reading “Will MiSTer Fool You Into Learning FPGAs?”

Game Boy Becomes Super Game Boy With A Pair Of Pis

For the Nintendo aficionados of the 90s, the Super Game Boy was a must-have cartridge for the Super Nintendo which allowed gamers to play Game Boy games on your TV. Not only did it allow four-color dot-matrix gaming on the big screen, but it let you play those favorite Game Boy titles without spending a fortune on AA batteries. While later handhelds like the PSP or even Nintendo Switch are able to output video directly to TVs without issue, the original Game Boy needed processing help from an SNES or, as [Andy West] shows us, it can also get that help from a modern microcontroller.

Testing the design before installing it in the NES case.

The extra processing power in this case comes from a Raspberry Pi Pico which is small enough to easily fit inside of a donor NES case and also powerful enough to handle the VGA directly. For video data input, the Pico is connected to the video pins on the Game Boy’s main board through a level shifter. The main board is also connected to a second Pico which handles the controller input from an NES controller. Some fancy conversion needed to be done at this point because although the controller layouts are very similar, they are handles by the respective consoles completely differently.

With all of the technical work largely out of the way, [Andy] was able to put the finishing touches on the build. These included making sure the power buttons, status LEDs, and reset button all functioned, and restoring the NES case complete with some custom “Game Guy” graphics to match the original design of the Game Boy. We commend the use of original Game Boy hardware in this build as well, which even made it possible for [Andy] and his wife to play a head-to-head game of Dr. Mario through a link cable with another Game Boy. If you’re looking for a simpler way of playing on original hardware without burning a hole in your wallet buying AA batteries, take a look at this Game Boy restoration which uses a Lithium battery instead.

Continue reading “Game Boy Becomes Super Game Boy With A Pair Of Pis”

Several frames from Bad Apple

PineTime Smartwatch And Good Code Play Bad Apple

PineTime is the open smartwatch from our friends at Pine64. [TT-392] wanted to prove the hardware can play a full-motion music video, and they are correct, to a point. When you watch the video below, you should notice the monochromatic animation maintaining a healthy framerate, and there lies all the hard work. Without any modifications, video would top out at approximately eight frames per second.

To convert an MP4, you need to break it down into images, which will strip out the sound. Next, you load them into the Linux-only video processor, which looks for clusters of pixels that need changing and ignores the static ones. Relevant pixel selection takes some of the load off the data running to the display and boosts the fps since you don’t waste time reminding it that a block of black pixels should stay the way they are. Lastly, the process will compress everything to fit it into the watch’s onboard memory. Even though it is a few minutes of black and white pictures, compiling can take a couple of hours.

You will need access to the watch’s innards, so hopefully, you have the developer kit or don’t mind cracking the seal. Who are we kidding, you aren’t here for intact warranties. The video resides in the flash chip and you have to transfer blocks one at a time. Bad Apple needs fourteen, so you may want to practice on a shorter video. Lastly, the core memory needs some updating to play correctly. Now you can sit back and…watch.

Pine64 had a rough start with the single-board computers, but they’re earning our trust with things like soldering irons and Google-less Linux mobile phones.

Continue reading “PineTime Smartwatch And Good Code Play Bad Apple”

Super 8 Camera Brought Back To Life

The Super 8 camera, while a groundbreaking video recorder in its time, is borderline unusable now. Even if you can get film for it (and afford its often enormous price), it still only records on 8mm film which isn’t exactly the best quality of film around, not to mention that a good percentage of these cameras couldn’t even record audio. They were largely made obsolete by camcorders in the late ’80s and early ’90s, although some are still used for niche artistic purposes. If you’d rather not foot the bill for the film, though, you can still put one of these to work with the help of a Raspberry Pi.

[befinitiv] has a knack for repurposing antique analog equipment like this while preserving its aesthetic. While the bulk of the space inside of this camera would normally be used for housing film, this makes a perfect spot to place a Raspberry Pi Zero, a rechargeable battery, and a power converter circuit all in a 3D printed enclosure that snaps into the camera just as a film roll would have. It uses the Pi camera module but still makes use of the camera’s built in optics which include a zoom function. [befinitiv] also incorporated the original record button so that from the outside this looks like a completely unmodified Super 8 camera.

The camera can connect to a WiFi network and can stream live video to a computer, or it can record video files to an internal SD card. As a bonus, thanks to the power converter circuit, it is also capable of charging a cell phone. [befinitiv] notes that many of the aesthetic properties of 8 mm film seem to be preserved when using this method, and he has several theories as to why but no definitive answer. If you’d like to take a look at some of his other projects like this, check out this analog camera that is now able to take digital pictures. Continue reading “Super 8 Camera Brought Back To Life”

Creating Video From A ROM

We’re used to computers with display screens, yet how many of us have created the circuitry to drive one directly? Sure, we’ve coded up an SPI display driver on a microcontroller, but create the hardware to generate a usable video signal? That’s a little more difficult. [Jdh] has given it a go though, with a TTL video card.

In this case it’s not a card so much as a collection of breadboards, but all the logic is there to generate the complex array of video timings necessary for synchronisation, and to output the bits sequentially at the right voltage levels for the analogue monitor. It’s worth pointing out though that it’s not a composite video signal that’s being created sinceit’s monochrome only with no subcarrier.

In the end he encounters the problem that his ROM isn’t fast enough for the pixel rate and thus the image has artefacts, but it does at least produce a recognisable and readable something on the screen. Old hands in the video business might point out that analogue TVs were a bit forgiving when it came to exact timings and line counts so the circuit could quite possibly be simplified, and also that trading away some of the resolution might fix the ROM speed issue. But it’s an impressive piece of work, and should be of particular interest for anyone interested in how video works.

Fans of video cards on breadboards should also check out [Ben Eater’s] 7400-series video card.

Continue reading “Creating Video From A ROM”