Hacker Tools, Hacked Tools

We just love a good DIY tool project, and more so when it’s something that we can actually use cobbled together from stuff in our closet, or hacked out of cheap “toys”. This week we saw both a superb Pi Pico-based logic analyzer and yet another software frontend for the RTL-SDR dongle, and they both had us thinking of how good we have it.

If you don’t already have a logic analyzer, or if you have one of those super-cheap 8-channel jobbies, it might be worth your while to check out the Pico firmware simply because it gets you 24 channels, which is more than you’ll ever need™. At the low price of $4, maybe a little more if you need to add level shifters to the circuit to allow for 5 V inputs, you could do a lot worse for less than the price of a fancy sweet coffee beverage.

And the RTL dongle; don’t get us started on this marvel of radio hacking. If you vaguely have interest in RF, it’s the most amazing bargain, and ever-improving software just keeps adding functionality. The post above adds HTML5 support for the RTL-SDR, allowing you to drive it with code you host on a web page, which makes the entire experience not only cheap, but painless. Talk about a gateway drug! If you don’t have an RTL-SDR, just go out and buy one. Trust me.

What both of these hacker tools have in common, of course, is good support by a bunch of free and open software that makes them do what they do. This software enables a very simple piece of hardware to carry out what used to be high-end lab equipment functions, for almost nothing. This has an amazing democratizing effect, and paves the way for the next generation of projects and hackers. I can’t think of a better way to spend $20.

Pico Logic Analyzer Gets New Version

[Happy Little Diodes] built a Pi Pico logic analyzer designed by [El Dr. Gusman] using the original design. But he recently had a chance to test the newest version of the design, which is a big upgrade. You can see his take on the new design in the video below.

The original design could sample 24 channels at 100 MHz and required two different PCBs. The new version uses a single board and can operate up to 400 MHz. There’s also a provision for chaining multiple boards together to get more channels. You can set the level shifters to use 5 V, 3.3 V, or an external voltage. Since [Happy] is working on a ZX Spectrum, the 5 V conversion is a necessity.

The code is on GitHub, although it warns you that version six — the one seen in the video — isn’t stable, so you might have to wait to make one on your own. The software looks impressive and there may be some effort to integrate with Sigrok.

If you missed our coverage of the earlier version, you can still catch up. Dead set on Sigrok support? [Pico-Coder] can help you out.

Continue reading “Pico Logic Analyzer Gets New Version”

Manta project logo - a manta ray, with cursive 'manta' written next to it

Manta: An Open On-FPGA Debug Interface

We always can use more tools for FPGA debugging, and the Manta project by [Fischer Moseley] delivers without a shadow of a doubt. Manta lets you add a debug and data transfer channel between your computer and your FPGA, that you can easily access with helpfully included Python libraries.

With just a short configuration file as input, it gives you cores you add into your FPGA design, tapping the signals of interest as an FPGA-embedded logic analyzer, interacting with registers, and even letting you quickly transfer tons of data if you so desire.

Manta is easy to install, is developer-friendly, has been designed in Amaranth, and is fully open source as you would expect. At the moment, Manta supports both UART and Ethernet interfaces for data transfer. As for embedding the Manta cores into your project, they can be exported to both Amaranth and Verilog. You should check out the documentation website — it contains everything you might want to know to get started quick.

The Manta project has started out as our hacker’s MIT thesis, and we’re happy that we can cover it for you all. FPGA-embedded logic analyzers are a fascinating and much-needed tool, and we’ve had our own [Al Williams] tell you about his on-FPGA logic analysis journey!

Logic Analyzers: Decoding And Monitoring

Last time, we looked into using a logic analyzer to decode SPI signals of LCD displays, which can help us reuse LCD screens from proprietary systems, or port LCD driver code from one platform to another! If you are to do that, however, you might find a bottleneck – typically, you need to capture a whole bunch of data and then go through it, comparing bytes one by one, which is quite slow. If you have tinkered with Pulseview, you probably have already found an option to export decoded data – all you need to do is right-click on the decoder output and you’ll be presented with a bunch of options to export it. Here’s what you will find:

2521888-2521888 I²C: Address/data: Start
2521896-2521947 I²C: Address/data: Address write: 22
2521947-2521954 I²C: Address/data: Write
2521955-2521962 I²C: Address/data: ACK
2521962-2522020 I²C: Address/data: Data write: 01
2522021-2522028 I²C: Address/data: ACK
2522030-2522030 I²C: Address/data: Start repeat
2522038-2522089 I²C: Address/data: Address read: 22
2522089-2522096 I²C: Address/data: Read
2522096-2522103 I²C: Address/data: ACK
2522104-2522162 I²C: Address/data: Data read: 91
2522162-2522169 I²C: Address/data: NACK
2522172-2522172 I²C: Address/data: Stop

Whether on the screen or in an exported file, the decoder output is not terribly readable – depending on the kind of interface you’re sniffing, be it I2C, UART or SPI, you will get five to ten lines of decoder output for every byte transferred. If you’re getting large amounts of data from your logic analyzer and you want to actually understand what’s happening, this quickly will become a problem – not to mention that scrolling through the Pulseview window is not a comfortable experience.

The above output could look like this: 0x22: read 0x01 ( DEV_ID) = 0x91 (0b10010001). Yet, it doesn’t, and I want to show you how to correct this injustice. Today, we supercharge Pulseview with a few external scripts, and I’ll show you how to transfer large amounts of Sigrok decoder output data into beautiful human-readable transaction printouts. While we’re at it, let’s also check out commandline sigrok, avoiding the Pulseview UI altogether – with sigrok-cli, you can easily create a lightweight program that runs in the background and saves all captured data into a text file, or shows it on a screen in realtime! Continue reading “Logic Analyzers: Decoding And Monitoring”

Decoding The 8088

There is a lot to like about open software, and in some areas, a well-thought-out piece of software can really make a huge impact. A great example of this is the Sigrok project. Creating simple devices that act like a logic analyzer is relatively easy. What’s hard is writing nice software for such a setup including protocol decoders. Sigrok has done it and since it is open, you can add your device and decode your protocol. [GloriousCow] had done the hardware part of interfacing to the 8088 in an IBM PC using an off-the-shelf logic analyzer that uses a customized version of Sigrok. But the output was a CSV file you had to process in a spreadsheet program. The next step: write a decoder for Sigrok to understand 8088 bus cycles.

The post covers the details of writing such a plug-in for Pulseview, the Sigrok GUI. It will also work for the command line interface if you prefer that. The code is in Python.

Continue reading “Decoding The 8088”

Bus Sniffing The Model 5150 For Better Emulation

At the risk of stating the obvious, a PC is more than just its processor. And if you want to accurately emulate what’s going on inside the CPU, you’d do well to pay attention to the rest of the machine, as [GloriousCow] shows us by bus-sniffing the original IBM Model 5150.

A little background is perhaps in order. Earlier this year, [GloriousCow] revealed MartyPC, the cycle-accurate 8088 emulator written entirely in Rust. A cycle-accurate emulation of the original IBM PC is perhaps a bit overkill, unless of course you need to run something like Area 5150, a demo that stretches what’s possible with the original PC architecture but is notoriously finicky about what hardware it runs on.

Getting Area 5150 running on an emulator wasn’t enough for [GloriousCow], though, so a deep dive into exactly what’s happening on the bus of an original IBM Model 5150 was in order. After toying with and wisely dismissing several homebrew logic analyzer solutions, a DSLogic U3Pro32 logic analyzer was drafted into the project.

Fitting the probes for the 32-channel instrument could have been a problem except for the rarely populated socket for the 8087 floating-point coprocessor on the motherboard. A custom adapter gave access to most of the interesting lines, including address and data buses, while a few more signals, like the CGA sync lines, were tapped directly off the video card.

Capturing one second of operation yielded a whopping 1.48 GB CSV file, but a little massaging with Python trimmed the file considerably. That’s when the real fun began, strangely enough in Excel, which [GloriousCow] used as an ad hoc but quite effective visualization tool, thanks to the clever use of custom formatting. We especially like the column that shows low-to-high transitions as a square wave — going down the column, sure, but still really useful.

The whole thing is a powerful toolkit for exploring the action on the bus during the execution of Area 5150, only part of which [GloriousCow] has undertaken as yet. We’ll be eagerly awaiting the next steps on this one — maybe it’ll even help get the demo running as well as 8088MPH on a modded Book8088.

$13 Scope And Logic Analyzer Hits 18 Msps

We aren’t sure what’s coolest about [Richard Testardi’s] Flea-Scope. It costs about $13 plus the cost of making the PCB. It operates at 18 million samples per second. It also doesn’t need any software — you connect to it with your browser! It works as an oscilloscope, a logic analyzer, and a waveform generator. Not bad. The board is basically a little life support around a PIC32MK and the software required to run it.

Of course, for $13, you need to temper your expectations. One analog input reads from -6 to 6V (hint: use a 10X probe). The goal was for the instrument to be accurate within 2%.  There are also nine digital inputs sampled simultaneously with the analog sampling. The signal generator portion can output a 4 MHz square wave or a 40 kHz arbitrary waveform.

Continue reading “$13 Scope And Logic Analyzer Hits 18 Msps”