How Pizza Tycoon Simulates Traffic On A 25 MHz CPU

Although the game Pizza Tycoon – known as Pizza Connection in Europe – probably doesn’t ring a bell for many folk, this 1994 DOS title is special enough for [cowomaly] to write an open source engine to bring it into the modern age as Pizza Legacy. Along the way, some questions popped up, such as how to animate the little cars that you see driving around in the simulated city and how the heck this was done back in the day on a 25 MHz 386 CPU.

Continue reading “How Pizza Tycoon Simulates Traffic On A 25 MHz CPU”

The Electromechanical Computer Of The B-52’s Star Tracker

The Angle Computer of the B-52, opened. (Credit: Ken Shirriff)
The Angle Computer of the B-52, opened. (Credit: Ken Shirriff)

In the ages before convenient global positioning satellites to query for one’s current location military aircraft required dedicated navigators in order to not get lost. This changed with increasing automation, including the arrival of increasingly more sophisticated electromechanical computers, such as the angle computer in the B-52 bomber’s star tracker that [Ken Shirriff] recently had a poke at.

We covered star trackers before, with this devices enabling the automation of celestial navigation. In effect, as long as you have a map of the visible stars and an accurate time source you will never get lost on Earth, or a few kilometers above its surface as the case may be.

The B-52’s Angle Computer is part of the Astro Compass, which is the star tracker device that locks onto a star and outputs a heading that’s accurate to a tenth of a degree, while also allowing for position to be calculated from it. Inside the device a lot of calculations are being performed as explained in the article, though the full equations are quite complex.

Not burdening the navigator of a B-52 with having to ogle stars themselves with an instrument and scribbling down calculations on paper is a good idea, of course. Instead the Angle Computer solves the navigational triangle mechanically, essentially by modelling the celestial sphere with a metal half-sphere. The solving is thus done using this physical representation, involving numerous gears and other parts that are detailed in the article.

In addition to the mechanical components there are of course the motors driving it, feedback mechanisms and ways to interface with the instruments. For the 1950s this was definitely the way to design a computer like this, but of course as semiconductor transistors swept the computing landscape, this marvel of engineering would before long find itself too replaced with a fully digital version.

The Kentucky Cave Wars, And Going Viral In 1925

Floyd Collins, the unfortunate star of this post. (Public Domain)

Information, it seems, flows at the speed of media. In the old days, information traveled with people on ships or horses, so if, say, a battle was won or lost, it could be months or even years before anyone back home knew what happened. While books and movable type let people store information, they still moved at the speed people moved. Before the telegraph, there were attempts to use things like semaphores to speed the flow of information,  but those were generally limited to line-of-sight operations. Carrier pigeons were handy, but don’t really move much faster than people.

The telegraph helped, but people didn’t have telegraph stations in their homes. At least not ordinary people. But radio was different. It didn’t take long for every home to have a radio, and while the means of broadcasting remained in the hands of a few, the message could go everywhere virtually instantly. This meant news could go from one side of the globe to the other in seconds. It also meant rumors, fads, and what we might think of today as memes could, too.

You might think that things “going viral” is a modern problem, but, in reality, media sensations have always been with us. All that changes is the number of them and their speed.

One of the earliest viral media sensations dealt with William Floyd Collins, an unfortunate man who was exploring caves during the Kentucky Cave Wars.

Continue reading “The Kentucky Cave Wars, And Going Viral In 1925”

A 6502 All In The Data

Emulating a 6502 shouldn’t be that hard on a modern computer. Maybe that’s why [lasect] decided to make it a bit harder. The PG_6502 emulator uses PostgreSQL. All the CPU resources are database tables, and all opcodes are stored procedures. Huh.

The database is pretty simple. The pg6502.cpu table has a single row that holds the registers. Then there is a pg6502.mem table that has 64K rows, each representing a byte. There’s also a pg6502.opcode_table that stores information about each instruction. For example, the 0xA9 opcode is an immediate LDA and requires two bytes.

The pg6502.op_lda procedure grabs that information and updates the tables appropriately. In particular, it will load the next byte, increment the program counter, set the accumulator, and update the flags.

Honestly, we’ve wondered why more people don’t use databases instead of the file system for structured data but, for us, this may be a bit much. Still, it is undoubtedly unique, and if you read SQL, you have to admit the logic is quite clear.

We can’t throw stones. We’ve been known to do horrible emulators in spreadsheets, which is arguably an even worse idea. We aren’t the only ones.

Hackaday Podcast Episode 365: Early 3DP Engineering, A New CAD Interface, And Flying Around The Moon

Humans flew around the Moon this week, but Hackaday Editors Elliot Williams and Tom Nardi were stuck on Earth — luckily, there was no shortage of stories and hacks to keep them occupied. From the news that Linux might be putting the i486 out to pasture, to the fascinating potential of the threadless ball screw and connecting Bluetooth calipers up to FreeCAD.

You’ll hear about the latest in Internet via high-altitude balloon, the zen of organizing your parts bins, all the problems with Markdown files, and a deep-dive into making a convincing LED fire effect. The episode wraps up with some polarizing opinions on long term data storage, and a freewheeling discussion about the importance of literal moonshots.

Check out the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Flying around the Moon? Download this episode in DRM-free MP3 so you’ll have something to listen to.

Continue reading “Hackaday Podcast Episode 365: Early 3DP Engineering, A New CAD Interface, And Flying Around The Moon”

Thermostat? Do It With A 555!

It is a running gag around here that whenever a project posts, someone will inevitably point out that it could have been done with a 555 timer IC. [Stephen Woodward] went the opposite way and built a simple thermostat using the ubiquitous chip.

To be fair, this isn’t some sophisticated PID controller — it’s basically a bang-bang controller. Since the device has a comparator and the circuits use a thermistor, it seems like a clever but simple idea on the surface. However, there are some neat tricks. For example, if you tie the 555 threshold pin to Vdd, then the trigger pin acts as an inverting analog comparator. Another nice feature: the setpoint depends on a resistance ratio, so there is no need for a precise input voltage reference.

A simple circuit change can switch the circuit to power a heater or a cooler. The chip can handle a surprising amount of power, but for some applications, you may need some output drive circuitry. The simple circuit even has hysteresis, which you can set with a different resistor. Pretty impressive for a cheap chip, two resistors, a thermistor, and a battery.

We’ve seen a lot of strange 555 circuits in our contests. We even had a 555 Timer Contest.

Cleaning An IBM 5150, And The Perfect Period PCB Soldermask

Now that early PCs have moved firmly from the realm of e-waste into being collector’s items, it’s worth putting in some effort to restore them if you find one. [Epictronics] has an early IBM 5150, the ancestor of all today’s PCs, and is bringing it back to life. Along the way, he’s building a replica AdLib sound card, making a useful discovery about how to make new parts look authentic.

The video below the break is a gentle journey through an early PC teardown, followed by the construction of the replica sound card. Here’s the interesting nugget of information: these new cards are careful recreations of the originals, but they just don’t look right. It seems modern soldermask is too shiny, and as luck would have it, there’s another option that is much more period-authentic. We hadn’t noticed matte green was available, but it certainly captures the look of those days much better.

As you might expect, such an old machine has a range of dead capacitors and a few chips. There’s a lucky escape with a Varta battery on an expansion card, having very little leakage, and part of one of the floppy drives needs some surgery. It’s gentle hacking that’s engaging to watch, and of course, at the end, we’re rewarded with the thing booting properly.

You might think reproducing a sound card is unusual, but we’ve seen it a number of times.

Continue reading “Cleaning An IBM 5150, And The Perfect Period PCB Soldermask”