Live data from Hacker News

Build an 8-bit computer from scratch

eater.net

41–50 of 56 posts

Re: Build an 8-bit computer from scratch

#41
This project looks awesome, and I may purchase Ben's kit to do with my 7 year-old son. My love of computers and software was largely inspired by the 6502 processor. I grew up with the commodore VIC20, C64 and 128 and reading books by Rodnay Zaks in the 1980's. https://en.wikipedia.org/wiki/Rodnay_Zaks

Perhaps I should look to see if any of my old books are still at my Dad's house. This one is going for nearly $1k on Amazon. Not sure how a book from 1981 can be sold as "new" but wow.

https://www.amazon.com/Programming-6502-Rodnay-Zaks-1981-09-...

Re: Build an 8-bit computer from scratch

#42
post #25
post #6

Just started on a fun educational project to emulate a Z80 processor in C. Trying not to look at any existing work, only documentation. Thinking I'll need to expand the project (emulating the rest of an actual, vintage computer) in order to run existing software and get the full kick out of it though. Suggestions? Looking for simplicity as I don't need another forever-project. Edit: asking because there's so many to…

Be careful, if you haven't done this before or done much network programming it's easy to get weird issues with endienness. Check out the ntohs etc. macros. IMO you should try to find a really simple computer to do first. The advantage here is you have other people's software to run which makes for a nice integration test. My first time I did the original apple and had it run the monitor program (which is nice you ca…

the one people try at first is CHIP8. Really simple and even with that you can not get it right on the first try

Re: Build an 8-bit computer from scratch

#43

"You need to enable JavaScript to view this site." I was expecting an interactive 8-bit computer simulation webapp, but all I got was something that could've been several pages on a static site. More disappointingly, it apparently requires a very "modern" browser to view :-( In my experience, to see this sort of anti-accessibility from someone who knows the "low-level" enough to build CPUs successfully is unusual, bu…

imagine finding such amazing content and then being mad that it was built with modern tools. what about the site violates accessibility? JS generated sites should be usable on screen readers. you can violate accessibility, but you can do that without js too

It's literally just a static page that's dumped out of a JavaScript file, Shopify iframes excluded. But if you want accessibility issues:

* The header image, saying “Ben Eater”, has no alt-text. That would be fine, except the letters are individual SVG paths.

* Likewise, the social media sharing buttons also have no alt-text. A screenreader will just see four images with links at the beginning of the page.

* The YouTube videos are constructed out of multiple links without text each, including SVG images.

* The YouTube video links open into the same window, harming usability. The "target" attribute should only really be used in sites built out of frames, and this is not one of the exceptions.

* My screenreader-type program, in "just read the proper text" mode, misses half of the headings. Outside of this mode, I have to sit through over a minute of drivel before the content, because there's no skip-nav link, and then again for the video links. (This one doesn't quite count, because it's 'cause my screenreader-type program sucks and ignores aria-hidden when I set it to "all". But the lack of skip-nav is an issue.)

* Can't even read the plain, boring old text without JavaScript. This in itself is an accessibility issue.

I got bored at this point, but I'll list some other issues I spotted while looking through the dynamically-constructed DOM:

* Identical SVG images are copied-and-pasted throughout the file, but with different CSS styles – some browsers might waste time re-rendering.

* The page makes seventeen requests even with external JavaScript blocked, eleven of which are to external domains.

* The DOM contains, no joke, eight consecutive s. The removal of some of these wrapping s makes no perceptible difference to the page.

* Mixing and matching semantic and non-semantic HTML tags, confusing certain "reader mode" tools.

And it turns out that this page is actually multiple pages, with no machine-accessible links between them, bundled up into one file stretched across multiple URIs. This is not the proper way to handle caching the next page. I'm struggling to articulate how bad this is.

When I click on the "kits" page, random loading animations partially obscure the top of some of the paragraphs as it tries, and fails, to add some kind of inline purchase widget. There's significant DOM bloat, and displaying the page takes up an entire core of my laptop.

Because of the caching failure I failed to properly articulate earlier, refreshing a page other than the one you initially clicked onto causes a cache miss for all of them, and the retransmission of the HTML page (though fortunately not the thirteen pages worth of stuff, which are stored in the ~0.2MB JavaScript file).

Loading the "kits" page directly and following all of the instructions the page provides (not my default configuration) causes my nice new shiny laptop to max out a core for three seconds while the browser requests the website, waits for the request to complete, parses the HTML, requests the JavaScript, requests the CSS, compiles the CSS, renders the DOM according to the CSS, compiles the JavaScript, runs the JavaScript, repeatedly polls something due to a setInterval call, performs 9 DOM Events (notorious for being the slowest API of the web), recalculates the style for and re-renders the DOM, completely hangs for 0.3 seconds for reasons unknown, recalculates, re-renders, runs some DOM events, fires off DOMContentLoaded (prematurely, not that the browser has any reason to know that – this might have accessibility impacts), runs more JavaScript to mutate the DOM further, performs several dozen incremental style updates and multiple repaints, fires off another DOMContentLoaded event, fires off the load event, fires off yet another DOMContentLoaded event, and another, and another (in amongst repeated recalculating and repainting of the DOM), fires off two more load events, etc.… Leaving behind one and a half seconds' worth of leisurely garbage collection after the page has finished loading, meaning I can't scroll until 4½ seconds after I click onto the page.

This is the only computing device I own capable of rendering the page in less than five seconds, even with my very fast network connection. Normal websites with an order of magnitude more writing, plus images and links, take an order of magnitude less time to load than this.

This website is not good. But it's nowhere near the worst out there – in fact, this would probably be in the top 60% of pages I use regularly, if I did.

Re: Build an 8-bit computer from scratch

#44
post #2

For the last couple years I've been toying with a relay computer design. Only a few prototype circuits have been built, but I do have (several) completed designs. I'm cautiously optimistic... it should be the fastest relay computer ever built, if I actually do build it. I have a whole bunch of reed relays on hand but the boards (and construction time!) are still expensive for a project of that size. What fascinates m…

For historical background, read up on Konrad Zuse[1], who built possibly the first programmable digital computer, using relays, the Z3[2], in 1941. (Neither ENIAC nor Colossus were operational for another couple of years.)

There is a much later Zuse design, from discrete transistors, the Z23, in the collection of the Computer History Museum[3].

[1] https://en.wikipedia.org/wiki/Konrad_Zuse

[2] https://en.wikipedia.org/wiki/Z3_(computer)

[3] https://www.computerhistory.org/collections/catalog/10266994...

Re: Build an 8-bit computer from scratch

#45
The description says:

> I built a programmable 8-bit computer from scratch on breadboards using only simple logic gates.

Sorry, but this is slightly incorrect. First, he is using ready-made adders in ALU which are not "simple logic gates", second he seems to use ROM in control logic which replaces tens or hundreds of logic gates one has to use of they don't have a ROM and a programmer.

If I was building a CPU, I would make 1-bit ALU and shift data bit-by-bit to save ICs because 1-bit ALU requires 4-5 simple ICs and 8-bit ALU would require 8 times more and that's too much.

Next, I would use 4-bit registers instead of 8-bit because 8-bit register requires 2 ICs and 4-bit register can be implemented with one IC. Also it allows to reduce the number of wires and amount of work to connect them. This makes CPU slower though because it has to access memory twice as often.

Also I was surprised to read in comments that in some universities students are designing CPUs as a practical project. Must be interesting.

Re: Build an 8-bit computer from scratch

#46

Earlier quoted context omitted.

share some others like him. i would like to explore other youtubers

Eevblog Smarter every day LEMMINO Socratica Captain disillusion Ahoy Khan Academy Moshix Historia civilis Computerphile jpkiwigeek Ippsec Pydata Deviantollam Lockpickinglawyer Numberphile Strafefox Company Man Accursed Farms Civvie11 ... In no particular order. YouTube is great.

I would add thesignalpath and mikeselectricstuff to the list. Much more advanced, but very good to learn professional PCB design

Re: Build an 8-bit computer from scratch

#47

Ben Eater is without a doubt in my top 10 youtubers. His videos are so in-depth and explained in such a great way that I come away learning huge amounts every time he posts. I’m sure a lot of this stuff is basic to people here, but to a software guy, I’ve found his channel invaluable for understanding how computers work at an electronics level and also just wildly fascinating.

share some others like him. i would like to explore other youtubers

Applied Science channel is worth mentioning.

Re: Build an 8-bit computer from scratch

#48
I built a Z80 computer for my high school senior project in the early 80s. I got CP/M mostly running; the floppy controller had some bugs I never quite worked out. Pretty much started me on the career path I've taken.

I'm building a 68000 system now for fun. I know I'll never really understand my desktop, so I'd like to have at least one computer in the house that I really fundamentally understand.

Re: Build an 8-bit computer from scratch

#49

Earlier quoted context omitted.

imagine finding such amazing content and then being mad that it was built with modern tools. what about the site violates accessibility? JS generated sites should be usable on screen readers. you can violate accessibility, but you can do that without js too

It's literally just a static page that's dumped out of a JavaScript file, Shopify iframes excluded. But if you want accessibility issues: * The header image, saying “Ben Eater”, has no alt-text. That would be fine, except the letters are individual SVG paths. * Likewise, the social media sharing buttons also have no alt-text. A screenreader will just see four images with links at the beginning of the page. * The YouT…

I think a big part of the reason why people don't care about accessibility anymore is because you can't make a website without someone pulling out a Bible-length list of asinine complaints, and that is for a site "in the top 60% of pages".

I know that I have stopped caring for "accessibility" almost entirely beyond the most obvious things. Most of these complaints are either totally inane and unnoticeable, or will affect so few people over the site's lifetime that I can count them on one hand. I think it's good for people to try and make your website as accessible as possible, but there's a limit to how hard you can indignantly demand people bend over backwards for you.

Re: Build an 8-bit computer from scratch

#50

Earlier quoted context omitted.

It's literally just a static page that's dumped out of a JavaScript file, Shopify iframes excluded. But if you want accessibility issues: * The header image, saying “Ben Eater”, has no alt-text. That would be fine, except the letters are individual SVG paths. * Likewise, the social media sharing buttons also have no alt-text. A screenreader will just see four images with links at the beginning of the page. * The YouT…

I think a big part of the reason why people don't care about accessibility anymore is because you can't make a website without someone pulling out a Bible-length list of asinine complaints, and that is for a site "in the top 60% of pages". I know that I have stopped caring for "accessibility" almost entirely beyond the most obvious things. Most of these complaints are either totally inane and unnoticeable, or will af…

Most of the issues I've listed aren't accessibility problems. They're caching, efficiency and usability problems. Only the first six are accessibility issues.

The list contains “inane and unnoticeable” issues because I was checking it manually, only spotting what came to mind. This is because external accessibility tools cannot check this website for accessibility issues, because they cannot access it.

I did not pick up on, for example, the issue of content flashing up on the screen in distinct parts, hitting the "three flicker limit" heuristic for seizure safety. Sure, that's only going to effect very few people, and it's fairly low contrast compared to other sites, and on a high-end gaming PC this would all occur within a single frame (making the point moot), but it's still something to consider and attempt to minimise.

Personally, I'm more concerned with the bandwidth; the fact that the page makes requests to Google's CDN for images and fonts that should be hosted on the same domain (and ideally provided on the same connection); and the ridiculous amount of processing my browser has to perform to draw the page. There are many more issues with the page than just a11y.

Post reply on HN