Building RAM into Veronica – the 6502 computer

ram-for-veronica

It seems strange that RAM is being added to a computer so late in the build, but [Quinn Dunki] must have had it in the back of her mind the whole time because it turns out to be a rather painless experience. For those of you keeping score, this makes her Veronica project Turing complete.

The brightly colored rats nest pictured above connects the new components to the 6502 computer backplane seen in the upper left. [Quinn] decided to go with two 32K SRAM modules which need very little in the way of drive hardware (it’s hanging out on the breadboard to the left). The RAM module will simply listen for its address and react accordingly. There is one hitch regarding a two-phase clock and the need to protect the RAM from erroneous data during the first of those phases.

Getting this all to work actually pointed out a bug in the ROM module she had long ago completed. After picking up on the problem she was able to correct it simply by cutting traces and soldering in jumper wires.

Mining bitcoins on a Nintendo

NES

His friends know [gbg] as an aficionado of just about anything with a 6502 processor in it. He’s also interested in bitcoins. A while back, a friend asked if it would be possible to mine bitcoins with an old Nintendo Entertainment System. While this suggestion was made in jest, it’s not one of those ideas anyone can let go of easily. Yes, it is possible to mine bitcoins with an NES, and [gbg] is here to show us how.

Mining bitcoins is simply just performing a SHA256 hash on a random value from the bitcoin network and relaying the result of that calculation back to the Internet. Of course this requires an Internet to NES bridge; [gbg] brought in a Raspberry Pi for this task. There’s the problem of actually getting data into an NES, though, and that’s something only a USB CopyNES can handle. After doing some 32-bit math, the NES sends this out to the Raspberry Pi and onto the bitcoin network.

When you consider that even a high-end gaming computer has little chance of mining a bitcoin in any reasonable amount of time, there’s little chance RetroMiner will ever be able to mine a bitcoin. It’s all random, though, so while it’s possible, we’ll just appreciate the awesome build for now.

Veronica 6502 computer reaches Hello World stage

veronica-hello-world

The screenshot on the right shows [Quinn Dunki's] computer project displaying a Hello World program. Well, it’s only showing the word Hello right now, but the concept is the same. This proves that native 6502 code is running on the processor and reliably outputting data through its VGA hardware. That’s a welcome achievement after watching so much work go into this project.

But with anything this complex you can’t expect to make progress without finding bugs. And this step in the journey had a pretty big one in store for [Quinn]. After writing the assembly code and loading it into the machine she was dismayed to find that there were dropped characters all over the place. Now she shows a screenshot and says it’s easily recognizable as a race condition — proving she has a bigger brain than us.

The problem is a pair of uninterruptible processes running on the same AVR chip (part of the GPU she built). They are fighting with each other for control of the processor cycles and she fixed it by making the daughter board seen in the image above. It moves one of the time-critical processes out of that single AVR chip to fix the issue by using an IDT7200L FIFO SRAM chip.

Another take on the 6502 computer

another-take-on-the-6502-computer

[Mark] is just starting off on his own 6502 computer odyssey. He was inspired by some of the other projects we’ve seen around here, like [Quinn Dunki's] Veronica Project, but with a spin that leverages modern processors to alleviate some of the messy work. As you can see above, there’s an Atmel chip perched above the 65C02 processor. This chip not only feeds the processor data (through all those slightly diagonal yellow wires) but also provides the clock signal and operates the reset and bus enable lines.

This is more of a hello world post for [Mark]. The chip is simply running NOP commands right now. But it shows that the basic idea works, and the video after the break lets us see another time-saving aspect of the circuit. He’s using a character LCD to display memory location and data values. The plan is to get a blog going, which he’s hesitant to do as it takes valuable hacking time away from the project. We disagree. The write-up (although incredibly fun for us to read) ends up being a reference manual for him once the project starts to get really hairy.

[Read more...]

Learn a little assembly language for the 6502 processor

6502-assembly-tutorial

Evern wanted to write your own Atari 2600 games? This won’t get you quite that far, but it will teach you the very basics. It’s an assembly tutorial for the 6502 processor. The nice thing is that you need nothing more than your browser to participate thanks to the embedded JavaScript emulator which acts as assembler, machine, and debugger in one.

The 6502 was in a lot of early equipment. In addition to the previously mentioned Atari they can be found in the Commodore 64, Apple II, and the original NES. You can even find folks building their own computers around the chip these days (most notable to us is the Veronica project). The guide starts off slowly, providing a working program and challenging the reader to play with to code in order to alter the outcomes. It moves on to an overview of registers and instructions, operators and branching, and culminates in the creation of a simple game.

[Thanks Mathilda]

How 6502 Overflow Works

6502 Overflow Circuit

The 6502 was a ubiquitous microprocessor back in the 80s, powering devices such as the Apple II and the Nintendo Entertainment System. [Ken] took an in depth look at a small part of the processor: the overflow circuit.

In order to do signed calculations, a microprocessor’s arithmetic logic unit (ALU) needs to be able to calculate when an overflow occurs. This happens when two numbers are added that cannot fit in a single byte. The result of a calculation will be incorrect, so the processor must inform the program that an overflow has occurred. This is done by setting an overflow flag.

[Ken] uses this example to first explain how the overflow circuit works in logic. He then looks at the gates and a transistor implementation of the logic. Finally, he walks us through the circuit on the actual 6502 die, showing how the circuit is constructed in silicon.

This is a great example to learn a bit more about how ALUs work and how integrated circuits get built.

Veronica VGA board finalized

veronica-vga-board-finalized

The latest update in the Veronica 6502 computer project is this finalized VGA board which now has a home in the machine’s backplane.

We’ve been glued to the updates [Quinn Dunki] has been posting about the project for many months now. Getting the GPU working proved to take quite a bit of time, but we learned a ton just by following along. The video output had humble beginnings way back in March. That breadboarded circuit got complicated very quickly and that was before it was even interfaced with the CPU. As you can see from the image above, etching and populating the GPU board really cleans up the build. We’re sure it’s robust enough to move around at this point. We wonder if she’s planning on showing it off at a Maker Faire or another geeky gathering?

It really has become clear how wise [Quinn] was to design a backplane board early on. It plays right into the modular concept. She was even smart enough to include that SIL pin header on the near side of the board which was used heavily while prototyping this video module.

Follow

Get every new post delivered to your Inbox.

Join 93,941 other followers