Writing A Very Tiny Chess Program

When programming for modern platforms, the restraints are different to those of 30 years ago. Back in the dawn of the microcomputer age, storage and RAM were measured in kilobytes. It simply wasn’t possible to store large amounts of graphical data, and even code had to be pared back at times. [reeabgo] found out some of these limitations first hand, when coding a tiny chess program for the Sinclair ZX81.

[reeabgo]’s project goes by the name ChesSkelet, and is truly tiny. Measuring in at just 377 bytes in its smallest version, the entire program takes up less space than this very article describing it. To achieve these feat requires certain sacrifices, of course. The tiniest edition contains no graphics whatsoever, representing the game state with simple characters and featuring no adornments whatsoever. The full-fat version comes in at 477 bytes and adds quite a lot of functionality. There’s a proper checkerboard, along with move legality checks and pawn promotion.

Unfortunately, advanced chess play isn’t quite possible – castling is not implemented, and the AI doesn’t yet handle check situations properly. Despite this, it’s a solid approximation of the real game, all packed into an impressively small space.

We see plenty of chess hacks around these parts – including the robotic variety.

Reverse Engineering A Modern IP Camera

Security cameras used to be analog devices feeding back into a room full of tiny screens and commercial grade VCRs. As technology moved forward, IP cameras began to proliferate. Early models simply presented a video stream and configuration page to the local network. Modern models aimed at the home market differ however. More often than not, configuration is through a strange smartphone app, and video is accessed through third-party servers. It’s all a bit oblique, and so [Alex] decided to take a look under the hood. 

The exploration begins externally, with [Alex] capturing data sent to and from the camera with Wireshark. Straight away, red flags are raised. For as yet unknown reasons, the camera attempts to resolve Google, Facebook and Alibaba servers over DNS. Disassembly then follows, revealing that a serial terminal with root access is available. [Alex] uses this to probe around, uncovering the firmware update script and a way to decrypt said updates.

The work thus is a great example of how to approach hacking a given device from first principles. The overall goal is to find a way to gain complete control over the camera, reprogramming it to serve up video as [Alex] wishes, rather than to a distant third party server. It’s not the first time we’ve seen an IP camera hacked, and we doubt it will be the last. If you’ve got one cracked, be sure to let us know.

An Air Quality Monitor That Leverages The Cloud

Air quality has become an increasing concern in many urban areas, due to congestion and our ever-increasing energy use. While there are many organisations that task themselves with monitoring such data, it’s also something anyone should be able to take on  at home. [Chrisys] is doing just that, with some impressive logging to boot.

The build starts with a Raspberry Pi Zero W, which offers the requisite computing power and Internet connectivity in a compact low-power package. For determining air quality, the Bosch BME680 sensor is used. This offers temperature, pressure, and humidity readings, along with the ability to sense the presence of volatile organic compounds, or VOCs. These can be harmful to human health, so it’s useful to have an idea of the levels in your home.

The hardware is incredibly refined. It’s simple enough for the newbie, but just begs for the more experienced hacker to expand on.

On the software side, data is accessible through the Balena cloud service. Sensor readings are stored in an InfluxDB instance, with Grafana providing the visually attractive graphs and monitoring. It’s all very slick and Web 2.0, and can be accessed from anywhere through a web browser.

The project is a great example of combining a basic DIY Raspberry Pi setup with the right software tools to create a polished and effective end product. Of course, if you’re looking for something more portable, this project might be more your style. 

Arduino Converts Serial To Parallel: The Paralleloslam

After a youth spent playing with Amigas and getting into all sorts of trouble on the school computer network, I’ve always had a soft spot in my heart for hardware from the 80s and 90s. This extends beyond computers themselves, and goes so far as to include modems, photocopiers, and even the much-maligned dot matrix printer.

My partner in hacking [Cosmos2000] recently found himself with a wonderful Commodore MPS 1230 printer. Its parallel interface was very appropriate in its day, however parallel ports are as scarce as SID chips. Thankfully, these two interfaces are easy to work with and simple in function. Work on a device to marry these two disparate worlds began.

Enter: The Paralleloslam

While I was gallivanting around the Eastern coast of Australia, [Cosmos2000] was hard at work. After some research, it was determined that it would be relatively simple to have an Arduino convert incoming serial data into a parallel output to the printer. After some testing was performed on an Arduino Uno, a bespoke device was built – in a gloriously plastic project box, no less.

An ATMEGA328 acts as the brains of the operation, with a MAX232 attached for level conversion from TTL to RS232 voltage levels. Serial data are received on the hardware TX/RX lines. Eight digital outputs act as the parallel interface. When a byte is received over serial, the individual bits are set on the individual digital lines connected to the printer’s parallel port. At this point, the strobe line is pulled low, indicating to the attached device that it may read the port. After two microseconds, it returns high, ready for the next byte to be set on the output lines. This is how parallel interfaces operate without a clock signal, using the strobe to indicate when data may be read.

At this point, [Cosmos2000] reached out – asking if I had a name for the new build.

“Hm. Paralleloslam?”

“Done. Cheers!”

Continue reading “Arduino Converts Serial To Parallel: The Paralleloslam”

Put An Arduino Enigma In Your Pocket

The German Enigma device has always been a fascinating gadget for hackers. We’ve seen various replicas and emulators created over the years, and it was recently even the subject of our weekly Hack Chat. But if you think about it it’s not really a surprise; the Enigma has the perfect blend of historical significance and engineering wizardry, with a healthy dash of mystery thrown in. Why do the bad guys always have the coolest toys?

If you’ve ever wanted your own little Enigma replica to explore, [Mark Culross] has put together a project which makes it easier than ever. In fact, it’s so straightforward that some of you reading this post will probably be able to put one together as soon as you’ve read this post from stuff you already have lying around in the parts bin. All you need is an Arduino Uno, an Adafruit 2.8″ TFT Touch Shield, and a penchant for World War II technology.

Thanks to the relatively high-resolution touch screen, [Mark] was able to develop a user interface for his Enigma that really gives you a feel for how the original machine worked. Obviously it’s considerably simplified from the real-world version, but using a stylus to tap the rotors you want to spin or the wires you want plugged in makes for a more immersive experience than many of the previous attempts we’ve seen. With a tap you’re even able to load historical machine configurations, such as how the Enigma aboard the submarine U-262 was configured when the Allies intercepted its encoded messages in 1942.

[Mark] says this project was always about developing the software, and he leaves the actual hardware implementation as an exercise for the user. Just to play around with the software it’s enough to hook up an Arduino and the touch screen, but we’d love to see somebody really take the idea and run with it. Add some batteries, a charging circuit, and put it all in a little wooden box for that authentic Enigma look. Can’t forget that iconic wrinkle finish paint, either.

Over the years, we’ve seen replica Enigma machines in all shapes and sizes. From ones you could mount on your wrist, to full size replicas using modern components. We’ve even seen one variation that you can print out on a couple of sheets of paper. The parade of recreations shows no sign of stopping, and we wouldn’t have it any other way.

Continue reading “Put An Arduino Enigma In Your Pocket”

Full Motion Video And 3D Graphics Make This Genesis Demo Pop

The SEGA Genesis (aka Mega Drive) was launched at the tail end of the 1980s, bringing a new level of performance to the console world. At the time, 2D graphics ruled the roost, outside a few niche titles here and there. Decades later however, the demoscene continues to work in earnest. The Red Eyes demo is a great example of what can be done when pushing the Genesis hardware to the limits.

The demo features full motion video and an impressive 3D sequence. It’s quite a feat to pull this off with the limited resources of the Genesis platform. [Remute], [Kabuto] and [Exocet] have laid their secrets bare in a technical document, describing in explicit detail how it’s all achieved.

There’s plenty of juicy reading material here. There are palette hacks to produce high-quality greyscale images, rendering tips to produce the smooth 3D rendered sequences, as well as optimizations to create the best possible sample playback using the onboard YM2612 sound chip. It’s a tour de force of development, and it’s astounding to look behind the curtain to see just what can be achieved.

If you’re thinking about tinkering with the Genesis yourself, you might find it useful to have a dev kit on your bench. Video after the break.

Continue reading “Full Motion Video And 3D Graphics Make This Genesis Demo Pop”

Running A Glider With The PX4 Flight Controller

There are a few open source autopilots available these days for quadcopters and fixed wing aircraft. Two of the most popular are ArduPilot and PX4, however neither is officially capable of working with unpowered aircraft. Despite this, [rctestflight] decided to run some experiments to see just how PX4 would fare when controlling a drone-launched shuttle glider.

The glider is a simple design built from foam board, controlled with two elevons, and fitted with a third servo to handle its release from the tow drone. It’s fitted with a Pixracer autopilot module and a Dragonlink telemetry link to the ground control laptop.

Initial testing was unsuccessful, with the drone ignoring return-to-home commands, and only responding to waypoints. After some further experimentation, performance improved. Testing and tweaking is the name of the game, and while the attempt to fly the glider into the back of the trailer failed, overall the project shows promise.

It’s impressive to see the glider tracing out perfect circles on the map under autopilot control. While it’s not officially supported, [rctestflight]’s work shows that it’s possible to run PX4 on a glider and have some success doing it. Future plans involve weather balloons and high altitude work, and we can’t wait to see the results.

PX4 has been used in a wide variety of projects, and can be used with even quite unusual aircraft. Video after the break.

Continue reading “Running A Glider With The PX4 Flight Controller”