41 comments

[ 3.3 ms ] story [ 93.4 ms ] thread
This is amazing. The root page for it is here: https://www.falstad.com/pong/index.html and shows how each part works.

Though I don't really understand how an image is produced on a CRT. In this circuit (https://www.falstad.com/pong/net.html), what is "NET" actually connected to?

A CRT moves the electron beam direction from top-to-bottom, left-to-right. If it sends electrons, the corresponding position on the screen lights up for about 1/50 s. So you can encode your pixels as a 0/1 pulse train, although you do have to take care of the time it takes to move the beam to the next line, and at the end to reset it to the top.

Idk what "NET" is, though.

(comment deleted)
(comment deleted)
I believe it is connected to the little red line you can see if you slow the simulation down. When it is high, the head of the little red line draws a pixel. Otherwise, it doesn't.

You can check this by deleting the input to net and then connecting a wire from some slow moving signal to net (so you can see how it responds in the image).

The CRT itself isn't actually modeled of course -- it is external hardware.

(comment deleted)
I think it's PFM. I'm not seeing anything in the simulator that lets you add a CRT type of display.

[Edit] Yeah, this is the case. If you view the page source, there's some custom JS drawing "NET" to a canvas. It's hard coded to pull from specific wires when they cross certain voltage thresholds in the simulation.

[Edit2] The implementation is also very buggy. The CRT simulation is just looping through X&Y completely decoupled from the circuit sim. Simple operations like stopping and running the sim while changing simulation speed will cause it to get off.

Good old falstad.com. used his applets religiously throughout undergrad, many years ago.
Same. Good thing he rewrote them in JS once applets were phased out.
I've started diving deeper into EE after having forgotten nearly everything I learned about it in college. Falstad is such an amazing tool! It's so much more immediate and interactive than the average SPICE tool, being able to observe the entire system has helped me a ton.

Are there any other similar tools out there? NI has Multisim, but the interface is buggy and clunky, although it can do AC sweeps and Bode plots, which I wish I could get Falstad to do.

Pretty cool, although a digital circuit is overkill for pong...

https://en.wikipedia.org/wiki/Tennis_for_Two

The goal here is less implementing pong and more achiving the pong arcade machine, a seminal piece of computing and gaming history.

Similar to bsnes (now higan) whose primary purpose is less being able to play games and more reproducing how the systems behaves, even if that's inferior in some cases (because it doesn't work around bugs of the original software), because in theory it allows running all software for the system correctly as long as they can be dumped, and thus actually archiving the entire software library rather than just some, or an altered form of it / them.

Even more impressive is the analogue version without any ICs!

https://www.eevblog.com/forum/projects/oscilloscope-pong-for...

That's really cool but I think you should understand that it's not 'analogue' if it has a bunch of transistors. This is called discrete because each component does a single operation. I see from the schematics that he builds flip flops from transistors for example.
> understand that it's not 'analogue' if it has a bunch of transistors.

That's ... not how it works. It's pretty much an analogue computer hardwired to play pong.

Um, err, I’m an ex EE. Everything is analogue underneath, even digital. It’s all just shuffling electrons around.

The whole device there is made from discrete opamps. Sure there are some flip flops in there but they are analogue too! (Build one and poke it with a scope and look at the rise and fall times for the collectors)

In that case let's get rid of the term 'digital' then, since analogue must clearly and fully describe all the phenomenon.
A quick scan of the schematic and I'm not seeing flip-flops in there. There are analog muxes with the fets, but maybe I missed something?
The function generator page has a flip flop labelled. The multiplexor logic has several unlabelled examples I think.
AFAICT, they're mainly running those transistors in the linear region.
What's impressive is the build; even using exactly the same circuit, I would have gone the reliable (ultimately) time-saving route of schematic -> PCB.
If you’re building one then it’s not time saving. I prototype stuff like that is built today and most of the time it stays like it.

Also it doesn’t always work the same when you get it on a PCB

In the 70's and early 80's you could buy handheld pong game machines that were actually mechanical. The cases were all jazzed up to look like they were electronic, and some even moved a tiny lightbulb around the "screen," but they were all gears and string inside.
That's pretty cool. I've seen that MAME has a netlist solver, so it should be able to play circuit-only games.
MAME created that netlist solver basically to put pong into its code. They also used it to get rid of wav samples of sounds and simulate them. Such as what donkey kong has in it.
When I was a kid, my dad had a book full of such maker models for doing special purpose game consoles.

So were the 70's, build your own games console from the ground up.

Playing this, I found a weird bug where the ball oscillates between bottom and top of the screen. It happens when you hit the ball right at the top of the screen at a specific angle.

Screenshot: https://imgur.com/m119hQH.png

That sounds vaguely familiar. I remember something like that happening with a device from the 1970s, which I can't now identify. I think it was mostly black plastic and offered a choice of about four different games, something like: table tennis, tennis, squash, solo squash. You could sometimes trap the ball between the bat and the top/bottom of screen and "squash" it there, causing the bounce beep to be repeated several times a second, but if you "squashed" it too hard it would pass through the bat to the other side. I can't now remember how you got it out of that state.
omg this is so impressive, made me curious on what development approach did he do to create the website
The simulator is based on an applet that's been around for a very long time. The CRT display is simply hacked onto it.
I played one of the very first Pong coin-ops as some kind of a market test in the country at the then-new King of Prussia mall in the early 70s, just set out by a fountain. It didn't generate much attention there but very soon afterwards the home versions and coinop CRT cabinets came out as "video arcades" started popping up all over. Culturally, there was a new market and suddenly something to do with your friends that didn't exist before.
Nitpick: this looks like a gate-level simulation, not circuit-level. Circuit level means transistors, resistors, ...