Ball Bearing Motor Rolls For Reasons Unknown

[RimstarOrg] has brought us an oldie but goodie this week. He’s built a ball bearing motor, a design which has been causing engineers and scientists to squabble for decades. [RimstarOrg] used a microwave oven transformer with a 70 turn primary coil and a single turn secondary coil to create a low voltage, high current AC power supply. Needless to say, there’s a real risk of fire or electrocution with a setup like this, so be careful if you try this one at home. [RimstarOrg] then built the motor itself. He de-greased two ball bearings then installed them on a metal shaft along with a wooden flywheel. The entire assembly was then mounted on a board so the wheel could spin freely. Two copper straps hold the bearings to the board. Finally, the transformer is wired into the copper straps. In this configuration, the current will flow through the outer race of one bearing, through the balls, and into the inner race. The current then passes down the axle and passes through the other bearing. There is very little resistance in this circuit, so it can only be powered on for a few seconds at a time before things start to melt down.

Continue reading “Ball Bearing Motor Rolls For Reasons Unknown”

A Deep Dive Into NES Tetris

Tetris AI

Back in 1989, Nintendo released Tetris for the NES. This detailed article first explains the mechanics of how Tetris works, then builds an AI to play the game.

To understand the mechanics of the game, the ROM source was explored. Since the NES was based of the MOS 6502 microprocessor, this involves looking at the 6502 assembly. The article details how the blocks (called Tetriminos) are created and how they move across the screen. The linear feedback shift register used for random number generation is examined. Even details of the legal screen and demo mode are explained.

After the tour through how Tetris works, an algorithm for the AI is presented. This AI is implemented in Lua inside of the FCEUX NES/Famicom emulator. It works by evaluating all of the possible places to put each new Tetrimino, and choosing the best based on a number of criteria. The weighting for each criterion was determined by using a particle swarm optimization.

The source for both the Lua version and a Java version of the code is available with the article. Everything you need to run the AI is available for free, except the Tetris ROM. If you’re interested in how 8 bit games were built, this dissection is a great read.

[via Reddit]

Flash Game Cartridge For The VIC-20

cart

[Petri]’s first computer was the venerable Commodore VIC-20, predecessor to the Commodore 64. With only 5kB of RAM, a very simple graphics chip, and BASIC, it’s a bare-bones system that’s perfect for a 7-year-old future programmer. [Petri] was trying to figure out something to do with this old computer, and realized the simple schematic would allow him to recreate those classic VIC-20 cartridges using modern hardware.

This project began by cracking open a few game cartridges to see what was inside. They’re very simple devices, consisting of a decoupling cap and a ROM chip wired directly to the data and address busses. [Petri] desoldered the ROM and replaced it with a ribbon cable that would give him a clean breadboard to VIC-20 expansion port interface.

Instead of finding a contemporary EEPROM chip to program, [Petri] decided on using a Flash chip. The original cartridge had a 16kB ROM chip, but the smallest parallel Flash chip he could find was 256k. No problem, then; just ignore a few address lines and everything worked out great.

After getting the VIC-20 reading the breadboarded Flash chip, [Petri] started work on a circuit that would program his Flash chip while still attached to the expansion port. With a few buffer chips and an ATMega32a loaded up with Arduino, he’s able to program the Flash chip and turn it over to the VIC-20.

A simple test that toggled the color of the screen as quickly as possible was all that was needed to test the new circuit. Now, [Petri] can finally start on programming some games for his first love.

Continue reading “Flash Game Cartridge For The VIC-20”

Hackaday Retro Edition And Retro Roundup

Retro-Roundup

About a year and a half ago, We launched the Hackaday retro edition, a small off-shoot of the main edition that is written in pure HTML, with no Javascript or any other Web 2.0 cruft. It’s designed so you can load this edition on any computer, from an Apple Newton to a Commodore 64. And people have done just that.

After a long period of neglect, we’re re-launching the retro edition with a new feature: every hour or so, five random Hackaday pages, going all the way back to the very first post will show up on the retro site. Yes, this was a feature we originally planned for the retro site, but now Hackaday has awesome devs working behind the scenes. I mean, they can set up a cron job! It’s amazing!

As always, you’re more than welcome to load our retro site with any vintage hardware, take a picture, and send it in. Odds are, we’ll plaster it up in one of these semi-frequent retro roundup posts.

No retro roundup post would be complete without a few examples of people loading the retro edition on old hardware. You can check a few out after the break.

Continue reading “Hackaday Retro Edition And Retro Roundup”

Minicomputers On Microcontrollers

Developed in the very late 60s and through the 70s, the PDP-11 series of minicomputers was quite possibly the single most important computer ever created. The first widely distributed versions of Unix and C were developed on the PDP-11, and it’s hardware influence can be found in everything from the Motorola 68000 to the MSP430.

When [Dave Cheney] saw the recent 8086 simulator written in 4kB of C code, he realized simulating entire computer systems doesn’t actually require a whole lot of resources outside a big chunk of memory. Armed with an Arduino Mega clone, he set out on one of the coolest projects we’ve seen in a while: simulating a PDP-11 on an AVR.

[Dave] used an ATMega2560-powered Arduino Mega clone with an Ethernet module for the hardware of this build. Attached to it is a shield filled up with a pair of RAM chips that expand relatively limited amount of RAM on the ‘Mega.

So far, [Dave] has his simulated system booting Unix V6 off an SD card. For PDP-11 storage, he’s also simulating an RK05 disk drive, a massive 14 inch platter containing 2.5 Megabytes of data. Compared to the original PDP-11/40, [Dave] estimates his machine is about 10 times slower. Still, an original 11/40 system fills multiple server racks, and the most common installations consume several kilowatts of power. The Arduino Mega can fit in a pocket and can be powered over USB.

Future developments for this system include improving the accuracy of the simulator, running more advanced operating systems and the DEC diagnostic programs, and possibly speeding up the simulation. We’d suggest adding some switches and blinkenlights on an additional shield, but that’s just us.

All the code can be found on [Dave]’s git, with a description of his SPI RAM shield coming shortly.

Sega Master System On A STM32 Development Board

Sega on STM32

Some hackers have managed to convert an STM32 development into a Sega Master System emulator. This means Sonic the Hedgehog running on an ARM Cortex-M4.

This hack has a number of parts. First, [Alessandro Rocchegiani] showed off a video of his Sega Master System emulator running on the STM32F429 Discovery development board. This first version used the on board 2.4″ TFT LCD screen.

[Fabrice] was working with this STM32 Discovery board already. He had developed an expansion board that added a number of features to the development kit, including an R-2R DAC for video output. When [Fabrice] found out about the Sega Master System emulator, he worked with [Alessandro] and his son [Fabrizio] to get VGA output working. They also added support for the Wii controller using [Fabrice]’s Wii library. The result is a Sega Master System emulator with VGA output at 640 x 480, with 16 bit color and Wii controller support.

You can watch a video of both the LCD and VGA versions of the hack after the break.

Continue reading “Sega Master System On A STM32 Development Board”

A DiskVaccuum For Obsolete Disk Formats

drive

[Jim] has a box of disks for a very old Compucolor II computer, and with bit rot slowly setting in he figured it might be time to dump all those disks to a more permanent format. After reviewing the existing tools to read these disks, he decided to build his own floppy disk interface that he calls the DiskVaccuum.

The DiskVaccuum is based on a Papilio Pro FPGA board and a few chips worth of level conversion. The FPGA is able to read bits and move the head of the disk with ease, saving everything to the drive of a much more modern computer.

On the USB side of the Papilio board, [Jim] wrote a shell of sorts in Python to capture tracks on the disk, read out the track listing, save an image file, and do all the things a proper DOS should. Right now the project is only for the Compucolor II disk drive, but [Jim] played around with KiCAD enough to create a Papilio-to-disk-drive interface board with connectors for most of the disk drives of this particular vintage. The hope is to generalize the hardware and software to read disks for other systems, including those with 8-inch drives.

[Jim] put up a video describing the hardware and demoing his Python capture utility. You can check that out below.

Continue reading “A DiskVaccuum For Obsolete Disk Formats”