Decoding The NEC V20 Microcode ROM

The NEC V20 is an Intel 8088-compatible processor that features the same use of microcode, though with its own characteristics. This makes it important to use this same microcode if your goal is to create a cycle-accurate emulator of this processor, as [GloriousCow]’s goal is. Cue decoding the microcode ROM in a die shot of this CPU, in order to create a usable ROM image.

As with any fabricated ROM you can technically do it by hand, the ROM section in the die shot contained 29,928 bits which even at a pretty zippy pace would take up a considerable amount of time to parse. Here you can divide-and-conquer by handing parts of the ROM off to good friends, or you can use automation and some machine vision and theoretically get an answer as soon as you have finished writing and testing the tool.

Close-up of some of the microcode bits.
Close-up of some of the microcode bits.

Although [Travis Goodspeed]’s MaskRomTool exists exactly to automate bit detection, it was found that there wasn’t enough contrast in the die shot for it to work reliably. What it did provide were the locations of the bits and from it 42×42 pixel PNG files of each bit.

Next a convolutional neural network (CNN) was trained to determine the difference between a 0 and 1 bit. This still took the manual classifying of 1,000 images, but seemed to work fairly well. Although some bits were marked as ambiguous, it was easy enough to use Mark 1 eyeballs to run a classification on these handful of images than to tweak the CNN model.

With this microcode in hand it was then possible to match it against the V20’s internal architecture to fully determine what each part does. Although not quite finished yet, there’s a GitHub repository containing the progress so far.

The V20’s microcode has been the focal point of much legal fighting back when NEC and Intel were still duking it out in how far one could make a CPU compatible with that of a competitor.

Sick Of Wayland Vs. Xorg? How About GEM?

Between lawsuits from Apple, and Microsoft being Microsoft, Digital Research’s GEM desktop for DOS never really had a chance. It did have another life on Atari home computers, but it’s the DOS version that provided the code for [Tomaz Stih]’s Linux port of the GEM graphical desktop — which isn’t a WM or DE for X or Wayland, for the record. It is entirely it’s own graphical display that will live in the framebuffer of a minimal Linux installation.

[Thomaz] is leveraging DR’s original code — or at least what started as DR’s code before a series of acquisitions and open sourcing — via OpenGEM and FreeGEM. Sample applications include the clock and calendar, but [Thomaz] says the APIs are compatible with Atari ST applications; presumably given the codebase the it will match the DOS version as well.

Much like when it was originally crushed betwixt Macintosh System and Microsoft Windows, we doubt many will be rushing out to use GEM instead of Wayland or XServer on Linux, but there may well be some use cases. If nothing else, it’s got to be lightweight.

If you missed the Digital Research GEM saga, this might get you up to date. If the idea of it running on Linux tickles your funny bone, you might enjoy seeing GEM on an AlphaSmart word processor.

One Bit Sound With The ZX Spectrum

[Michael] has a thing for playing audio over beepers using a single bit. He’s done it with the Apple ][ and the IBM PC. This time he turns to the ZX Spectrum. He didn’t get quite as good a result — at least not yet — but he did manage to get some things working. He documents everything, so even though this wasn’t a successful week, there’s sometimes more to learn from reasonable failures than from unreasonable successes.

Of course, the whole thing relies on pulse code or pulse width modulation. Of the two techniques, PWM should produce better results. However, he wasn’t able to get PWM working yet. Some other target computers drive the buzzer through a dedicated hardware timer. However, with the Spectrum, it is all software.

Continue reading “One Bit Sound With The ZX Spectrum”

The Different Ways To Look At Negative Resistance

[lcamtuf] has an in-depth look at the concept of negative resistance that goes somewhat further than one might expect. Normally, as voltage across a resistance increases so too does the current. Negative resistance is the concept of current decreasing as voltage increases. But beyond the raw concept, there are a few other ways to look at this idea.

The usual way to think about it is negative differential resistance (NDR). Not everything has a linear relationship between voltage and current, and for a device to exhibit NDR means that in certain ranges the I–V curve actually slopes downward; increasing one of voltage or current decreases the other. This kind of thing occurs in neon lamps. Once they are glowing, increasing current can result in decreasing voltage.

True negative resistance, that of a literal -100 Ω resistor, does not exist. Not in the sense of a passive component, anyway. Such a device would supply power into a circuit rather than dissipating it, and would therefore require an external power source to do so. If that’s not a deal breaker, then it’s actually fairly simple to build one. [lcamtuf] provides a design for a device that uses an op-amp to exhibit ideal constant negative resistance. Naturally it only does so within its operating range; going beyond risks letting out the magic smoke.

Is making a literal negative resistor of practical use? Perhaps only in very specialized situations. But it is worth having a basic understanding if for no other reason than it rears its head in unusual places: the strange tunnel diode comes to mind.

The virtual pet showing a distressed face while a phone is in use

Anti-Doomscroll Tamagotchi Only Lives If You Do

The odds are, you have a device deliberately designed to be addictive in your pocket or on the table next to you if you aren’t staring at it right now– your smartphone. We’ve seen a number of projects that try and help people control or moderate their phone usage using a variety of techniques; this vitual pet by [brenpoly] does it by weaponizing human empathy, and our bizzare ability to pack-bond with literally anything.

The virtual pet itself is based on an ESP32 in a cutesy 3D-printed case, and we think it would probably work well enough if it just had hard-coded behaviors based on hooks in what you’re doing on your phone– the “my little buddy is sick because I’m doomscrolling” should be effective enough on its own, and that part is hardcoded on the ESP32 along with the regular virtual pet behaviour–but this is the year of our Llama 2026, so there has to be an LLM in there somewhere, right?

Some people would leave this part out, but we think [brenpoly]’s use of a local LLM on the phone does improve the project. The local agent doesn’t just have access to his screen time, but his notifications, too, and runs a whisper model linked to a microphone in the virtual pet via bluetooth. So you can get the contents or a summary of your notifications without looking at your phone, or just ask the little guy to tell you a joke. Giving the pet a voice with a the local piper model is also more effective at getting you to put your phone down when you hit the limits.

They’ve put the whole thing up on GitHub if you want to make your own– and if we can keep one person from strapping themselves to a shock collar, then this project is doing good in the world. If helps [brenpoly] or any of his fans do less scrolling and more hacking, that’s even better. Of course there’s a whole spectrum between “electrocute yourself” and “lovable virtual pet” when it comes to controlling your phone use, a spectrum that includes phone stands or even smart vaults for your device.

Thanks to [brenpoly] for the tip! Remember, all of your doomscrolling is justified if you find something to send to our tipsline. 

Continue reading “Anti-Doomscroll Tamagotchi Only Lives If You Do”

Are Desktop PC-ABS Prints Outperformed By Industrial FDM? Not Really

[Igor] of [My Tech Fun] set out to discover what differences, if any, can be found between parts printed in PC-ABS filament on an industrial 3D printer, and those from prosumer-grade machines and filament. His video is full of his usual attention to detail as he compares a test suite of parts printed at home in Polymaker PC-ABS with those from a Stratasys Fortus 450mc using proprietary PC-ABS filament.

PC-ABS is a filament that strives to deliver the benefits of both polycarbonate and ABS. It’s durable and has fantastic impact resistance, but it costs a bit more than either PC or ABS and requires a heated chamber.

In the end, PC-ABS from a home printer compares favorably to an industrial system, at a fraction of the price.

[Igor] has previously compared industrial ABS with comsumer ABS, but what made him curious about PC-ABS in particular was the large difference in print temperatures between Polymaker PC-ABS, and Stratasys’s own proprietary PC-ABS.

[Igor] prints Polymaker filament at 280º C in a 60-65º C  chamber, whereas the Stratasys filament prints at 325º C with a chamber temperature of 95º C. That’s quite a difference. The industrial printer has over double the print time, to boot. Would test objects printed from the industrial filament, on an industrial machine, be noticeably different from those printed at home?

To find out, [Igor] orders a test suite of parts from a company with a Stratasys Fortus 450mc (who was also kind enough to take a short video of the machine in action) and prints his own on both a Prusa Core One L, and a Bambu Labs H2D. He then proceeds to compare them in a variety of ways while testing them to destruction.

What’s the bottom line? The industrial prints have better dimensional accuracy, but the home prints have the edge in appearance. When it comes to performance the differences are mostly minor, and not always in the industrial system’s favor. Broadly speaking, PC-ABS from the home workshop compares very favorably from an expensive industrial system and proprietary filament, at a fraction of the price. See it for yourself in the video, embedded just below.

Continue reading “Are Desktop PC-ABS Prints Outperformed By Industrial FDM? Not Really”

Fixing A 1990s LEGO Electric Train Speed Regulator

Before LEGO train sets moved to battery-powered locomotives with plastic rails, all of them worked pretty much like any other train set of the era. This meant metal rails that the locomotive’s wheels would use to pick up power from and a central controller that would inject said power and also regulate the train’s speed and direction. The LEGO 2868b Electric Train Speed Regulator is one such example, and [Nonsense Wars] recently had one under the knife to repair it.

The single PCB inside is quite straightforward, with the 9-12 VAC supply input from an external power adapter, and a variable voltage regulator that sees its target voltage switched by a bank of resistors.

It are these resistors that the big yellow control switches between when you operate it, changing the output voltage and also output polarity you cross the midway point. Effectively this means that there is just one non-passive component on the PCB, in the form of the TO-220 package strapped to the big heatsink.

In this particular unit it was found to be a Fairchild KA317, which is for all intents and purposes here the same as an LM317T. One quick swap later and this controller was back in business like it was 1995.

Compared to the engineering crammed into a modern “smart brick”, things really have come quite a ways in the world of LEGO.

Continue reading “Fixing A 1990s LEGO Electric Train Speed Regulator”