A PCB business card that plays tic-tac-toe with red and blue LEDs.

2024 Business Card Challenge: Go Tic-Tac-Toe-to-Toe With Them

There is perhaps no more important time to have a business card than when you’re in college, especially near the end when you’re applying for internships and such. And it’s vital that you stand out from the crowd somehow. To that end, Electrical & Computer Engineer [Ryan Chan] designed a tidy card that plays tic-tac-toe.

Instead of X and O, the players are indicated by blue and red LEDs. Rather than having a button at every position, there is one big control button that gets pressed repeatedly until your LED is in the desired position, and then you press and hold to set it and switch control to the other player. In addition to two-player mode, the recipient of your card can also play alone against the ATMega.

The brains of this operation is an ATMega328P-AU with the Arduino UNO bootloader for ease of programming. Schematic and code are available if you want to make your own, but we suggest implementing some type of changes to make it your own. Speaking of, [Ryan]  has several next steps in mind, including charlieplexing the LEDs, using either USB-C or a coin cell for power, upgrading the AI, and replacing the control button with a capacitive pad or two. Be sure to check it out in action in the two videos after the break.

Continue reading “2024 Business Card Challenge: Go Tic-Tac-Toe-to-Toe With Them”

Kernel Hack Brings Windows XP To The 486

The venerable Intel 486 was released in 1989 as the successor to the extremely popular Intel 386. It was the minimum recommended processor for Windows 98.  (Surprisingly, the Windows 95 minimum was a 386!)  But by the time XP rolled around, you needed at least a 233 MHz Pentium to install. Or at least that was the case until recently when an extremely dedicated user on MSFN named [Dietmar] showed how he hacked the XP kernel so it could run on the classic chip!

The biggest issue preventing XP from working on earlier processors is an instruction introduced on the Pentium: CMPXCHG8B. This instruction compares two 8-byte values and takes different actions depending on an equality test. It either copies the 8 bytes to a destination address or loads it into a 64-bit register. Essentially, it does what it says on the tin: it CoMPares and eXCHanGes some values. If you want to dig into the nitty-gritty details, you can check out this info on the instruction taken from the x86 datasheet.

Without getting too technical, know that this instruction is vital for performance when working with large data structures. This is because one instruction moves 8 bytes at a time, unlike the older CMPXCHG instruction, which only moves a single byte. Essentially, [Dietmar] had to find every usage of CMPXCHG8B and replace it with an equivalent series of CMPXCHG instructions.

On a side note, the once well-known and devastating Pentium F00F bug was caused by a faulty encoding of the CMPXCHG8B instruction. This allowed any user, even unprivileged users, to completely lock up a system, requiring a full reset cycle!

So [Dietmar] was successful, and now you can run the German version of Windows XP on either a real 486 or an emulated one. The installer is available on the Internet Archive and there’s a detailed video below demonstrating installing it on the 86Box virtual machine host.

Continue reading “Kernel Hack Brings Windows XP To The 486”

Hackaday Links Column Banner

Hackaday Links: June 23, 2024

When a ransomware attack targets something like a hospital, it quickly becomes a high-profile event that understandably results in public outrage. Hospitals are supposed to be backstops for society, a place to go when it all goes wrong, and paralyzing their operations for monetary gain by taking over their information systems is just beyond the pale. Tactically, though, it makes sense; their unique position in society seems to make it more likely that they’ll pay up.

Which is why the ongoing cyberattack against car dealerships is a little perplexing — can you think of a less sympathetic victim apart from perhaps the Internal Revenue Service? Then again, we’re not in the ransomware business, so maybe this attack makes good financial sense. And really, judging by the business model of the primary target of these attacks, a company called CDK Global, it was probably a smart move. We had no idea that there was such a thing as a “Dealer Management System” that takes care of everything from financing to service, and that shutting down one company’s system could cripple an entire industry, but there it is.

Continue reading “Hackaday Links: June 23, 2024”

Rescued IMac G4 Restored And Upgraded With Mac Mini M1 Guts

Three abandoned iMac G4s, looking for a loving home... (Credit: Hugh Jeffreys)
Three abandoned iMac G4s, looking for a loving home… (Credit: Hugh Jeffreys)

The Apple iMac G4 was also lovingly referred to as the ‘Apple iLamp’ due to its rather unique design with the jointed arm on which the display perches. Released in 2002 and produced until 2004, it was the first iMac to feature an LCD. With only a single-core G4 PowerPC CPU clocked at around 1 GHz, they’re considered e-waste by the average person.

That’s how [Hugh Jeffreys] recently found a triplet of these iMacs abandoned at an industrial site. Despite their rough state, he decided to adopt them on the spot, and gave one of them a complete make-over, with a good scrub-down and a brand-new LCD and Mac Mini M1 guts to replace the broken G4 logic board.

The chosen iMac had a busted up screen and heavily corroded logic board that looked like someone had tried to ‘fix’ it before. A new (used) 17″ LCD was installed from a MacBook Pro, which required the use of a Realtek RTD2660-based display controller to provide HDMI to LVDS support. The new logic board and power supply were sourced from a Mac Mini featuring the M1 SoC, which required a 3D printed adapter plate to position everything inside the iMac’s base. Wiring everything up took some creative solutions, with routing the wires through the flexible monitor arm the biggest struggle. The WiFi antenna on the Mac Mini turned out to be riveted and broke off, but the iMac’s original WiFi antenna could be used instead.

Although some clean-up is still needed, including better internal connector extensions, the result is a fully functional 2024 iMac M1 that totally wouldn’t look out of place in an office today. Plus it’s significantly easier to adjust the monitor’s angle and height compared to Apple’s official iMac offerings, making it the obviously superior system.

Continue reading “Rescued IMac G4 Restored And Upgraded With Mac Mini M1 Guts”

A solar-powered decibel meter the size of a business card.

2024 Business Card Challenge: NoiseCard Judges The Sound Around You

Let’s face it: even with the rise of the electric car, the world is a noisy place. And it seems like it has only gotten worse in recent years. But how can we easily quantify the noise around us and know whether it is considered an unhealthy decibel level?

That is where the NoiseCard comes in. This solar-powered solution can go anywhere from the regrettable open office plan to the busy street, thanks to a couple of 330 µF capacitors. It’s based on the low-power STM32G031J6 and uses a MEMS microphone to pick up sound from the back of the card, which the code is optimized for. Meanwhile, the LEDs on the front indicate the ambient noise level, ranging from a quiet 40 dB and under to an ear-splitting 105 dB or greater.

When it comes to building something the size of a business card, every component is under scrutiny for size and usefulness. So even the LEDs are optimized for brightness and low power consumption. Be sure to check it out in action after the break in various environments.

Continue reading “2024 Business Card Challenge: NoiseCard Judges The Sound Around You”

Tiny Tapeout 4: A PWM Clone Of Covox Speech Thing

Tiny Tapout is an interesting project, leveraging the power of cloud computing and collaborative purchasing to make the mysterious art of IC design more accessible for hardware hackers. [Yeo Kheng Meng] is one such hacker, and they have produced their very first custom IC for use with their retrocomputing efforts. As they lament, they left it a little late for the shuttle run submission deadline, so they came up with a very simple project with the equivalent behaviour of the Covox Speech Thing, which is just a basic R-2R ladder DAC hanging from a PC parallel port.

The computed gate-level routing of the ASIC layout

The plan was to capture an 8-bit input bus and compare it against a free-running counter. If the input value is larger than the counter, the output goes high; otherwise, it goes low. This produces a PWM waveform representing the input value. Following the digital output with an RC low-pass filter will generate an analogue representation. It’s all very simple stuff. A few details to contend with are specific to Tiny Tapout, such as taking note of the enable and global resets. These are passed down from the chip-level wrapper to indicate when your design has control of the physical IOs and is selected for operation. [Yeo] noticed that the GitHub post-synthesis simulation failed due to not taking note of the reset condition and initialising those pesky flip-flops.

After throwing the design down onto a Mimas A7 Artix 7 FPGA board for a quick test, data sent from a parallel port-connected PC popped out as a PWM waveform as expected, and some test audio could be played. Whilst it may be true that you don’t have to prototype on an FPGA, and some would argue that it’s a lot of extra effort for many cases, without a good quality graphical simulation and robust testbench, you’re practically working blind. And that’s not how working chips get made.

If you want to read into Tiny Tapeout some more, then we’ve a quick guide for that. Or, perhaps hear it direct from the team instead?

Continue reading “Tiny Tapeout 4: A PWM Clone Of Covox Speech Thing”

2024 Business Card Challenge: Integrated Game Card

[Dan Schnur] has a simple strategy to ensure their business card stays on the client’s desk and doesn’t just get lobbed in a drawer: make it into a simple gaming platform. This entry into the 2024 Business Card Challenge is based around the tinyjoypad project, integrating an SSD1306 OLED display, joypad, and push button.

Powered by the superstar ATTiny85, the electronics are really not all that much, just a sprinkling of passives to support the display and the six switch inputs from the joystick and push button. Or at least, that’s how much we can glean from the PCB images, as the PCB design files are not provided in the project GitHub.

Leaving the heavy lifting of the software to the tinyjoypad project, the designer can concentrate on the actual job at hand and the reason the business card exists to stay at the forefront of the client’s mind. In the meantime, the card can be a useful distraction for those idle moments. A few such distractions include a tiny version of Missile Command (as shown above), tiny tris, and a very cut-down Q-bert.  Sadly, that last game isn’t quite the same without that distinctive sound.