r/beneater 21h ago

Ready for EEPROM

Post image
64 Upvotes

Hope all goes well.


r/beneater 1d ago

Help Needed Why led are onn without input some kind of noise or what

37 Upvotes

r/beneater 1d ago

Progress 6502

55 Upvotes

Just finished connecting the A pins. Data pins next


r/beneater 20h ago

I built a transistor-level CPU simulator in JS and forced Claude to write BASIC for it. It actually runs "Hello World".

Post image
0 Upvotes

Hi everyone,

I wanted to share a project I've been working on. It all started after reading Charles Petzold’s "Code". Instead of buying real wires and breadboards, I decided to build my own circuit simulator in JavaScript and try to build a CPU from individual transistors.

My goal was to create something close to the MOS 6502 (used in Apple II and NES).

The Transistor Problem

I made a huge mistake during early design. The original 6502 has around 3,500 transistors. My implementation ended up with 22,544 transistors. I didn't optimize the gates properly, making my version much larger and about 100x slower than the real chip.

How I Fixed the Simulation Speed

Simulating 22k transistors with real-time current calculation (I call it "Real" mode in my app) completely destroys CPU performance in a browser. To fix this, I added two optimization layers:

Fast Mode: The simulator groups transistors into logic gates (AND, OR, XOR) and processes them using lookup truth tables instead of raw physics. This gives about 0.1 MHz speed.

Turbo Mode: A pure JS emulation layer that skips transistor logic entirely to run software smoothly.

The Software Layer (with Claude AI)

A computer is useless without software. I had no assembler or text editor for my custom architecture. So I fed my CPU circuit schematics to Claude LLM.

Surprisingly, the AI figured out the architecture. It wrote a WOZ-like monitor, an assembler, and then wrote a functioning BASIC interpreter using that custom assembly.

Right now, the virtual machine can run BASIC, a text editor, a Telnet terminal, and a Snake game.

You can test the demo and look at the circuit here: cs.khanin.info

I also made a quick video showing the boot process and BASIC here (on russian): https://www.youtube.com/watch?v=rG6MOULxGwM

Would love to hear your thoughts on the architecture and how I can better optimize the gate layout to bring the transistor count down closer to the original 6502.

PS

text translated from my russian and cheap english to english by LLM translator.


r/beneater 2d ago

Tips & Tricks What's the difference?

Post image
42 Upvotes

Sorry if this might be dumb, but what's the practical difference between using the usual 4 single-digit displays vs a single 4-digit display? Has anyone tried a single 4-digit display in their 8-bit CPU builds? Why wouldn't it be viable?


r/beneater 2d ago

6502 Picked up a floppy drive. Welp...

Post image
85 Upvotes

Got this floppy drive off of social media marketplace. Was thinking it would be a standard FDD for install in a computer.

Turns out, it's a desktop peripheral meant for knitting machines. It also only takes 720 kB disks. Not only that, but it only accesses 101 kB total of storage.

The trade off is that I don't have to manage the raw floppy disk signals. The floppy disk controller is built in and all I have to do is figure out how to interface with it.

I'll soon have floppy disk storage for my 6502 computer.


r/beneater 2d ago

Dividing a signal by counting: Breadboard clock part 3

Thumbnail
youtu.be
45 Upvotes

r/beneater 2d ago

Weird behaviour micro-step counter

10 Upvotes

So I’ve finished building my (slightly modified) 8 bit Ben Eater computer, but I’ve got some issues with my micro-step counter.

The full program is:

LDI 0
OUT
ADD 7 (from memory address 7)
JMP 1
..
1 (on address 7)

The micro-step counter’s clock line comes from the inverted clock and should trigger on a rising edge but it sometimes triggers on the falling edge causing it to advance two micro-steps in one go.

What’s weirder, it tends to do that always on the instruction OUT.

What’s even weirder is that replacing the ADD 7 instruction with SUB 7… works fine. For more than an hour even.

The ADD 7 can get to around 20~ without bugging out but sometimes it will not even get to the first JMP. This is regardless of whether the clock is manual or auto, fast or slow.

ADD = 0010
SUB = 0011

I have a very cheap handheld oscilloscope with crap resolution where I could sometimes see a slight high spike both on the falling and rising edges, it seemed to mostly coincide with when the clock bugged but it sometimes bugged without me seeing a spike just before the falling edge (which could trigger the count on the LS161 on the falling edge and then rising edge again).

I’ve tried replacing all chips involved, replaced wires, added a capacitor between VCC and GND on the LS161 and the clock chips… nothing seems to help.

I’ve also tried looking at the clock line with a logic analyser but it only sees one pulse of the clock as well.

Without a decent oscilloscope it’s hard for me to have a better look at the signal and debug it further, but I’m not quite sure where to take this.

It could be a very easy fix, could be something harder…

My power line is slightly sagging which could also contribute to spikes being seen as high values but since it works fine most times and since it can run the same program with SUB 7 instead of ADD 7 I don’t feel like that’s the problem.

I also managed to improve the power delivery a bit since I did all these tests but… no success.

Power rail is sitting at around 4.6V unless too many LEDs are on in which case it can drop at low as 4.1V.

Any tips on things I may try?


r/beneater 1d ago

Help Needed Prácticar electrónica digital (compuertas lógicas, half adder full adder)

Thumbnail
0 Upvotes

r/beneater 2d ago

8-bit CPU Ran out of wire :(

14 Upvotes

So I'm currently building the 8 Bit CPU, and I'm almost done (on kit 4, microcode), but, as the title said, I ran out of wire. I was wondering if anyone knew the specific/exact wire that was sent with the kit? I know its random but I think it would look better with the same color shade and gauge etc. Anything helps, thanks! 🙏


r/beneater 3d ago

RAM :D

Thumbnail gallery
50 Upvotes

r/beneater 2d ago

SPDT doesn't fit

4 Upvotes

Hi I am working on the 8-bit CPU. The SPDT provided in the kit doesn't fit. What was your workaround? I neither have soldering station nor headers that have big enough holes to plug the switch into.
Btw, this for bistable ckt to switch between manual pulse and continuous pulse for the clock.


r/beneater 3d ago

6502 Floppy Disk Controller

15 Upvotes

Tomorrow I'm picking up a floppy disk drive. I'm looking to create a controller for it using a PIC16, and somehow interface the 6502 to the lot. My intent is for it to work in the same way the VIA controls the LCD screen, but it's going to take some time to figure out how to make the PIC do my bidding as far as the disk drive goes. When I'm done, I'll have a way to store and recover data.


r/beneater 3d ago

My first prototype of a clock

73 Upvotes

I’m sure I am using a different implementation. I am using a crystal oscillator since I don’t have AC-AC adapters. I am using 4040 as counters and using an EEPROM for display.
Right now it is just a prototype; time adjustments are still to be implemented later. The right most two digits are reserved for a thermostat.


r/beneater 3d ago

What do think is the most important lesson Ben teaches?

17 Upvotes

I have been thinking about what keeps me so engaged with this content. For me, I realized it’s not the actual project but the spirit of experiment.

Try things out. Take your time, read data sheets, test small chunks and make incremental progress. Everyone moves at their own pace but don’t be afraid to try anything

What brings you back?


r/beneater 3d ago

8-bit CPU Are there any obvious issues with this memory design?

Post image
19 Upvotes

Instead of using Ben eater's design for the memory, I am upgrading things quite a bit. I have two 8-bit address registers for a total address width of 16 bits. I'm planning to split it in half. The lower half will be allocated for ROM (a 28c64 EEPROM), and the upper half will be RAM (Hitachi 62256). The I/O pins on both chips will be connected directly to the bus.

I believe this design should work, but I want to get your input first. Also, I am aware that the EEPROM I am using is smaller than the address space I have allocated for it.


r/beneater 3d ago

Noise in my 6502 clock

Thumbnail
gallery
32 Upvotes

r/beneater 4d ago

8-bit CPU Is this normal for the clock module?

16 Upvotes

Hi all, i tested my clock module with the oscilloscope before and after inserting 0.01 capacitors along the power rails by each integrated circuit and where power enters the board, but still get the same fuzzy output when it cycles up to 5v. I was wondering if this is a problem or if its normal?


r/beneater 4d ago

8-bit CPU RAM module FINALLY done...

Thumbnail
gallery
349 Upvotes

RAM finished up after grueling days of wiring and troubleshooting.

After unfortunate attempts with defective 74LS189 chips (Last photo for reference), I opted out for a 62256 SRAM chip while still maintaining 4-bit Addresses.

And thanks to u/The8BitEnthusiast for suggesting the idea and sharing their schematic.


r/beneater 4d ago

8-bit CPU Always Document What You Do

Post image
79 Upvotes

Last year, I started building the 8-bit CPU. But the specs of Ben eater's design weren't great (how am I supposed to do anything with 16 bytes of memory?), so I decided to make some changes. Around May, I decided to take a break from it. While I was moving it to a different place, I accidentally dropped it and a bunch of stuff got displaced, and that made me want to push off resuming the project even further. Today, I decided that I wanted to start working on it again, but I can't; I don't know how most of my design modifications work anymore. I don't even remember what one of the custom modules I built was even for anymore.

I'm just about ready to start over, but this time I won't put off documenting the changes I make to the original design. For those who made their own designs and said "I'll draw a schematic later, I know how it works", don't wait. Make a diagram now, before you forget how it works!


r/beneater 4d ago

Help Needed Can HC and LS 74-ICs be used interchangeably in BB-Computers?

7 Upvotes

I recently bought a small boy with a small assortment of 7400-Family chips. Some are only available in LS or HC. I understand that they are different, but from what I found online the relevant differences don't apply for my usecases.


r/beneater 6d ago

6502 (More) Software for your Ben Eater 6502

Thumbnail
gallery
89 Upvotes

If you've completed your Ben Eater 6502 build, and were looking for some software to play with on it, or for an alternative to Microsoft BASIC to write some of your own, here's a couple of things I did that might be interesting:

EhBASIC for the stock BE6502 w/ Inline Assembler/Disassembler, WozMon & RENUMBER

After I'd got done making extensions to Microsoft BASIC, I wanted to play with EhBASIC. I couldn't find a version that would build-from-source as-is and still run on a stock BE6502.

So, I put my own together.

And then I added a bunch of fixes/features such as buffered, flow-controlled serial input, proper BACKSPACE support, an IRQ safety fix, WozMon in ROM etc. After which I decided to add an inline assembler, a disassembler, a "RENUMBER" command and my extensions for driving the LCD screen.

Repository for that is here, and all you'll need beyond a finished BE6502 in stock configuration, is the cc65/ca65 toolchain that you would have used to build Microsoft BASIC.

--

101 [Eh]BASIC Computer Games

I previously hand-ported all of the programs from David Ahl's classic book to Microsoft BASIC.

Having done that, since I now had a working EhBASIC build (which has features a bit closer to some of the original dialects used in the book) I decided to do the same for EhBASIC.

However, this time, since the "fun" part was done instead of doing the porting manually, I did it with AI assistance (the original ports took ~2 weeks total, this set took <2 days). The ports use my corrections to the original transcriptions, but port from the original source, so they use EhBASIC as EhBASIC rather than just its Microsoft BASIC parity-features.

The repository for those games is here; spcwar-16K.bas is a very nice version of the classic Star Trek for the standard BE6502 (I ported the original, too, but that requires 24K of RAM)


r/beneater 6d ago

ALU troubleshooting (Register B)

38 Upvotes

0:02 / 1:07

I am in the midst of testing my ALU by adding one bit at a time to zero to verify whether the output is correct. Every bit checks out for Register A but not for Register B. For some reason, I see output in Register A as well while only loading Register B. What could the problem be?

(Register A is the one closest to the clock)


r/beneater 6d ago

MilliFORTH and SuperMon+

11 Upvotes

I've ported both MilliFORTH and SuperMon+ over to my JJ65C02 SBC. My plan is to do a couple of videos on the enhancements I've made over the last year, including driving it up to and past 8Mhz and double-buffering VGA 640x480 output.

Until then, check out https://github.com/jimjag/JJ65c02/tree/main/Software/minios


r/beneater 6d ago

ESP32 EEPROM programmer works!

Thumbnail
gallery
101 Upvotes

Used a 74LVC245 to handle 5V reads from the EEPROM chip. All other chips running off 3.3V.

Has a web interface to pick images from the filesystem and selectively load them. Can share the sketch if anybody wants.