Simulating And Visualising The Central Limit Theorem

Statistics is one of those fields which people tend to love or hate when they’re confronted with it during their school time. Although incredibly useful and even essential in many fields, including finance and engineering, it’s not always easy to grasp even the basics such as those pertaining to distributions. The Central Limit Theorem (CLT) is an essential element there, which [Greg Foletta] tried to make easier to comprehend using some code samples and visualizations.

The essential summary of the CLT is that if you take the mean of each sample in a set, once you have enough (>30) samples, the distribution of the sample means approaches a normal distribution. This is quite the theorem to put out there, with the supporting proof and explanations on e.g. Wikipedia being very mathematics-heavy.

We’d be remiss not to also mention the excellent [3Blue1Brown] video on the topic, which has even snazzier visualizations if you’re more into learning in that fashion. Even if you don’t think that you need to learn statistics and how distributions work, chances are that you’ll come across a situation where it could have come in handy, or at least have deepened your understanding of a topic like the probability of something happening.

Continue reading “Simulating And Visualising The Central Limit Theorem” →

UDP Broadcasting Meets The More Focused Multicasting

After previously exploring the basics of UDP broadcasting, why IPv4 subnets are an exciting feature that you really want to dive into, as well as the contentious topic of IPv6, there are still plenty of elephants to admire and cans of sardines to crack open. One of them being the topic of broadcasting versus multicasting, which at first glance sounds rather similar and may even have some wondering why you’d even bother with multicasting if you can just send-and-forget with IPv4 broadcast address.

Of course, we already found out that IPv4 broadcast addresses come in a few flavors, and that’s before you start even considering the implications of subnets and routing limits. When we then consider that in IPv6 broadcast addresses were dropped completely in favor of link-local multicast addresses, and that IPv4 also supports multicast, then this raises the question whether using IPv4 multicast’s own take on ‘link-local’ doesn’t make more sense.

Or perhaps more succinctly put, is IPv4’s take on link-local broadcasting as straightforward as IPv6’s?

Continue reading “UDP Broadcasting Meets The More Focused Multicasting” →

Reverse Engineering A 1960s Diode-Transistor Logic IC

Before transistor-transistor logic (TTL) took over, diode-transistor logic (DTL) was a common sight especially in pre-IC circuits where it was a major improvement over resistor-transistor logic (RTL). That said, it’s rare to see DTL used in ICs considering how e.g. TI’s 5400 and 7400 series set the trend in the 1960s. This makes the Signetics ST680a quad-NAND gate DTL DIP IC that [Ken Shirriff] ogled recently a bit of a treat.

This was also one of the earliest ICs to use the then brand new plastic dual in-line package (PDIP) for modular convenience, even if [Ken] was none too happy about as unlike ceramic DIP, PDIP requires more extreme methods to decap to access the die for reverse-engineering.

Overall, TTL is faster and less power-hungry than DTL, but it took a while to work out its issues, including noise immunity and fan-in/out issues. Until then alternatives like DTL still made sense as a well-understood and mature technology. In the article an example is provided of how a DTL NAND gate as used in this IC works, which is really quite simple in how it uses multiple diodes to sum the inputs, which subsequently drives the transistors.

We’d like to thank [CuriousMarc] for finding this IC in his strategic reserve of unknown ICs and for doing the initial decapping using hot air, as well as [Ken] for doing the analysis and documenting of this fascinating glimpse into early semiconductor logic history.

An FPGA Version Of The AT&T UNIX PC For MiSTer

We all have our childhood heroes, which in the case of [Hrvoje Cavrak] was the 1985 AT&T UNIX PC. This 18 kg behemoth of a workstation computer boasted a 10 MHz Motorola 68010 CPU, up to 4 MB of RAM and dozens of megabytes of storage in addition to endless expansion options, making it a powerhouse of a personal computer for the discerning professional. Now, many decades later [Hrvoje] has an FPGA-based version to tinker with.

This project targets the MiSTer project, meaning that this softcore with SystemVerilog, Verilog and VHDL components should synthesize and run on any MiSTer-compatible FPGA system, such as the DE10 Nano. For that board the SDRAM add-on board is required due to the DE10 Nano Cyclone V SoC’s FPGA side only having access to a fraction of the 4 MB required by the softcore.

Obviously the boot ROM and disk images for AT&T UNIX are still under copyright, so although you can download both you should be wary of provoking the current copyright holder. With that in place, however, you now have got access to a very complete UNIX PC experience, as can be seen in the demonstration video.

Some aspects of the code were written and validated by LLM coding chatbots, so this is still a ‘works on my MiSTer board’ project. In lieu of getting access to the real hardware – meanwhile priced at unobtanium levels – this seems like a fair enough trade-off if old workstations like these are your thing.

The UNIX PC obviously didn’t make it into mainstream computer as we covered previously, with the IBM PC with MS-DOS, CP/M and Apple’s systems quickly cornering the home market along with Commodore, Atari, etc. This possibly makes these AT&T UNIX PCs even more rare than 1990s SGI and Sun systems.

Continue reading “An FPGA Version Of The AT&T UNIX PC For MiSTer” →

Repairing A Polaroid 630 SL Lightmixer Instant Camera

Before the advent of digital cameras, if you wanted to take a few photos without having to get a whole roll of film developed, you’d use some form of instant camera. The Polaroid 630 SL Lightmixer that [Odd Tinkering] is looking at in a recent video is a good example of a late-80s, early-90s instant camera. As a mass-market product he got it slightly broken for $10, figuring it’d make for an interesting repair and restoration project.

Unlike the 1970s instant cameras that still used plenty of metal and such for the housing and mechanisms, this 600-series camera is pretty much an all-plastic affair. Produced much like the practically identical Lightmixer 630 between 1986 and 1992 it’s clearly designed for easy assembly, with plastic clips holding the whole affair together.

The symptoms for this sold-as-broken machine mostly pertained to issues with the trigger button and it taking shots by itself. This issue along with the flash not working turned out to be just due to corrosion on some connectors, but just getting to these parts required many hours of frustrating prying and trying not to break plastic. Somewhere along in all that violence the internal switch – consisting of a piece of bent copper strip – for the flash also ended up being broken.

With said broken strip patched and brazed back together, the corrosion cleaned and the outer shell’s paint having received a touch up, it works and looks pretty much as it would have back around 1990. You can even still get 600-series film for it today, as the retro-nostalgia factor seems to keep drawing people back to these machines, with newer models still being produced in various guises.

Continue reading “Repairing A Polaroid 630 SL Lightmixer Instant Camera” →

Using Halftone Images In QR Codes Without Upsetting Scanners

Although quick-response (QR) codes are rather simple monochrome affairs, adding embellishments to them is a popular activity, if only to make QR codes not stick out like a sore thumb in e.g. flashy marketing flyers. The most simple approach here is to put any regular graphic in e.g. the center of said QR code and lean on the scanner’s error-correcting features to route around the damage, but a more sophisticated approach uses halftone images that are blended with the QR code, as first demonstrated in 2013 by [Hung-Kuo Chu] et al.

A number of online halftone image QR generators exist that use the methodology in said 2013 paper to allow you to generate any mesh-up you like. Here [Jorge C. Lucero] provides a JavaScript-based version written from scratch that can run client-side. According to [Jorge] this was a weekend’s project created out of sheer curiosity.

The basic way that this algorithm works is by using each of the data modules of the QR code as a 3×3 grid of submodules, using only the center sub-module as the module’s color. The other sub-modules are thus free to be assigned a halftone color grade that creates the final module’s appearance.

Although this should generally work without leaning on the scanner’s error-correction features, an ‘enhancement’ mode is possible that enhances the image clarity at the cost of introducing some scanning errors that will require correction. Overall it provides a pretty clear improvement over simple binary image embedding, especially when higher resolution QR codes are used.

Why The ULC Audio Codec Is A Perfect Fit For The N64

Although the Nintendo 64 could deliver solid 3D graphics with assets loaded at a blistering speed from the game cartridge, audio-wise it was a bit more hampered. The main challenge here was that streaming PCM audio data from a roomy CD as on the PlayStation wasn’t an option, and using compressed audio samples was impaired by Nintendo’s refusal to open up more than the CPU for third-party codecs, leading to most N64 games using so-called ‘sound fonts’ that use sample-based tracks.

Once the N64’s RSP vector processor became available for use by developers it became possible to use MP3s without clobbering the CPU, but this was still an imperfect solution. In a recent article by [Dominic Szablewski] it is thus argued that the Ultra Low Complexity (ULC) codec might be a match made in haven for the N64 hardware.

This still uses the same modified discrete cosine transform (MDCT) as many lossy audio codecs including MP3 do, but the ULC code is designed to be extremely light-weight for decoding. [Dominic] first came across it in the form of an old Game Boy Advance demo that played a 70 kbps file with no issues on the 16 MHz ARM CPU.

Naturally the ULC codec’s creator [Aikku93] didn’t employ any unusual black magic to achieve this feat, mostly just foregoing some of the heavier elements of e.g. MP3 like splitting the signal into bands, and using a light-weight syntax to store transformed coefficients.

Here [Dominic]’s goal was to port the ULC code to work with the N64’s RSP so as to offload as  much of the decoding as possible. This required becoming extremely intimate with MIPS assembly, with [Dominic] eventually giving up and asking an LLM coding chatbot to translate bits of ULC C code to [Max Bebök]’s RSP language (RSPL) syntax instead.

The good news here is thus that the open source N64 SDK libDragon now has ULC support, just in case you want more than simple tracker-based music for your homebrew N64 game and do not feel like clobbering the RSP and CPU at the same time with something like MP3 or Ogg Vorbis.