Circuit-Level Game Boy: Upping Emulation Ante By Simulating Every Cycle

Usually when writing emulation software for a system like the Game Boy, one makes sure to take as many shortcuts as possible in order to reduce the resources required for the emulation. This has however the unfortunate side-effect that it reduces the overall accuracy of the emulation and with it the compatibility with games on the system.

This is the basic reasoning behind projects which seek to abandon simplistic abstractions in favor of cycle-accurate, full compatibility approaches, of which MetroBoy is probably the most extreme one. Instead of abstracting away the hardware, it instead does the emulation at the circuit level. As with such other projects, this means that the emulator requires a lot more CPU cycles to get things just right. On the bright side, one can likely still run this emulator on any modern system.

As the MetroBoy author explains, he implemented code in C++ which allowed him to construct circuits in an HDL-style manner, which should theoretically also allow him to generate a Verilog (or VHDL) softcore out of the project. As a demonstration of implementing HDL in C++ it’s decidedly interesting.

An approach like this is pretty much the exact opposite of a project like the UltraHLE (ultra high-level emulator) Nintendo 64 emulator, which used the knowledge that Nintendo 64 games are written in C as a first step to creating libraries that the code in the Nintendo 64 ROMs would call instead of the native (Nintendo) libraries. This allowed N64 games to directly run on the target system, with the graphic and system calls translated by UltraHLE into native OS calls, using the 3dfx Glide API for accelerated graphics.

While an approach like UltraHLE took allows for the most minimal use of system resources by essentially foregoing emulation completely, for retro systems like the Game Boy where games were implemented in assembly on bare hardware, using this circuit-level emulation ensures that one gets the most accurate match with the original handheld console experience.

As a word of caution to those who are now itching to try out MetroBoy, its Github site notes that it currently lacks support for game saves, uses a mixture of original Game Boy (DMG) and Game Boy Advance SP (AGS) hardware that confuses some games and has rather buggy sound support.

If playing around with software-defined Game Boy circuits isn’t enough and would like to literally look inside a real Game Boy, the X-ray image from the top of the article is something Chris over at Elektronaut pulled off several years ago.

Picking The Right Sensors For Home Automation

Imagine that you’re starting a project where you need to measure temperature and humidity. That sounds easy in the abstract, but choosing a real device out of many involves digging into seemingly infinite details and trade-offs that come with them. If it’s a low-stakes monitoring project, picking the first sensor that comes to mind might suffice. But when the project aims to control an AC system in an office of temperature-sensitive coders, it pays to take a hard look at the source of all information: the sensor.

Continuing a previous article I would like to use that same BMaC project from that article as a way to illustrate how even a couple of greenhorns can figure out how to pick everything from environmental sensors to various actuators, integrating it into a coherent system that in the end actually does what it should.

Continue reading “Picking The Right Sensors For Home Automation”

Go Subterranean With This DARPA Challenge

Whether it comes to rescuing people from a cave system or the underground maze of sewers, tunnels and the like that exist underneath any major city, having accurate maps of the area is always crucial to know what the optimal routes are, and what the expected dangers are. The same is true for combat situations, where such maps can mean the difference between the failure or success of a mission. This is why DARPA last year started the Subterranean Challenge, or ‘SubT’ for short.

This challenge seeks new approaches to map, navigate, and search underground environments during time-sensitive combat operations or disaster response scenarios, which would allow for these maps to be created on-demand, in the shortest amount of time possible. Multidisciplinary teams from the world are invited to create autonomous systems that can map such subsurface networks no matter the circumstances.

Continue reading “Go Subterranean With This DARPA Challenge”

Transcending The Stack With The Right Network Protocol

The increase in network-connected devices the past years has been something of a dual-edged sword. While on one hand it’s really nice to have an easy and straight-forward method to have devices talk with each other, this also comes with a whole host of complications, mostly related to reliability and security.

With WiFi, integrating new devices into the network is much trickier than with Ethernet or CAN, and security (e.g. WPA and TLS) isn’t optional any more, because physical access to the network fabric can no longer be restricted. Add to this reliability issues due to interference from nearby competing WiFi networks and other sources of electromagnetic noise, and things get fairly complicated already before considering which top-layer communication protocol one should use. Continue reading “Transcending The Stack With The Right Network Protocol”

The Joy Of Properly Designed Embedded Systems

The ages-old dream of home automation has never been nearer to reality. Creating an Internet of Things device or even a building-wide collection of networked embedded devices is “easy” thanks to cheap building blocks like the ESP8266 WiFi-enabled microcontroller. Yet for any sizable project, it really helps to have a plan before getting started. But even more importantly, if your plan is subject to change as you work along, it is important to plan for flexibility. Practically, this is going to mean expansion headers and over-the-air (OTA) firmware upgrades are a must.

I’d like to illustrate this using a project I got involved in a few years ago, called BMaC, which grew in complexity and scope practically every month. This had us scrambling to keep up with the changes, while teaching us valuable lessons about how to save time and money by having an adaptable system architecture.

Continue reading “The Joy Of Properly Designed Embedded Systems”

Buy Your Very Own Commercial Flight Simulator

If you happen to live near Phoenix, Arizona, have a spare US$10,000 or so kicking around, and have always fancied your own true-to-life commercial flight simulator, today is your lucky day. With just over a week to go on the auction, you can bid on a used flight simulator for a Bombardier CRJ200 regional jet airliner.

The CRJ200 jet was produced between 1991 and 2006, first being introduced in 1992 by Lufthansa. It’s a twin-engine design, with about 50 seats for passengers. With a length of more than 26 meters, 12,500 km (41000ft) ceiling, 785 km/h (487mph) cruising speed and a range of around 3,000 km (1864 mi) (depending on the configuration), it offers plenty of opportunities for the aspiring (hobbyist) pilot.

The auction stands at the time of writing at $4,400 offered and lasts until Monday, January the 28th. Local pick-up is expected, but the FAA-certified simulator comes complete with all of the manuals and the guarantee that it was 100% working before it was disassembled to ready it for auction. Just make sure that you have somewhere to put it before putting in that bid, and you could be the owner of a rig that would leave some of the best we’ve seen so far behind in the dust.

The Lost Art Of Steam Heating

We got pointed by [packrat] to a 2015 presentation by [Dan Holohan] on the history and art of steam heating systems. At the advent of central heating systems for entire buildings, steam was used instead of water or air for the transport medium. These systems were installed in landmark buildings including the Empire State Building, which still use them to this day.

A major advantage of steam-based heating system is that no pump is required: the steam will naturally rise up through the piping, condenses and returns to the origin. This can be implemented as a single pipe where condensation returns through the same pipe as the steam, or a two-pipe system where the condensate returns through its own pipe.

In the presentation, Dan walks us through his experiences working on many of these steam heating systems in major US buildings, the types of systems, fixes implemented by engineers long since dead and the particularities of maintaining these systems.

Continue reading “The Lost Art Of Steam Heating”