8 ms·
Apple II graphics: More than you wanted to know
- verisimi 2y ago[flagged]
- PaulHoule 2y agoThe first generation of home computers used discrete components for the display controller which is crazy expensive because you need lots of counters, comparators, wide data paths, etc which adds up to a lot of parts. Second generation machines line the VIC-20 and TRS-80 Color Computer used ASICs for the display controller. Apple though the ][ was on borrowed time and has no idea how long it would last so they were slow to come out with the ][e which was cost-reduced.
- beepill 2y agodo you know more home computers that did the display controller like the apple II did? I think it may be inspiring to people who make their own diy cpus
- jandrese 2y agoI think the Commodore PET used discrete TTL as well. This is first generation stuff for home computers, the costs are so high that manufacturers were highly incentivized to make graphics chips as soon as the technology was viable, right around 1979 or 1980. Anything made from then on is going to have a dedicated graphics chip of some kind just for the cost savings.
- PaulHoule 2y agoSo did the other member of the "trinity", the TRS-80 model I. My mental picture is that the kind of display controller I'd like to build is about two large breadboards stuffed with 54xx chips. Such a thing is a bit simpler than a minimal CPU but not that much simpler because you need the stuff to interface with memory. I'd probably want to buy an oscilloscope and/or logic analyzer but maybe I could run it slow and use an AVR-8 Arduino to run test sequences. Almost everybody who builds throwback computers today uses either an FPGA or a microcontroller for the display controller. For instance https://github.com/fdivitto/FabGL https://github.com/fdivitto/FabGL is a highly flexible controller implemented for the ESP32 which can do tile-based graphics and sprites for games but also emulate an ANSI terminal. This is used in this SBC https://www.olimex.com/Products/Retro-Computers/AgonLight2/open-source-hardware https://www.olimex.com/Products/Retro-Computers/AgonLight2/o... which I am going to highly recommend because this machine is compatible with the old Z80 machines but has a real 24 bit mode with 24 bit registers and also performs an order of magnitude better than any Z80 machine did back in the day. Modern systems usually avoid the unified memory model that was popular back in the day but that also usually held back the performance of the CPU because one way or another the VDC was stealing cycles. The AgonLight board communicates with the display controller through a serial port, for instance. This thing http://www.commanderx16.com/ http://www.commanderx16.com/ has a memory mapped register for the address in video RAM the CPU wants to read/write and another for the data. The address register will auto-increment when access the data register so you can read or write video RAM at high speed just by repeatedly accessing the data register. The CX-16 uses an FPGA as a display controller https://github.com/X16Community/x16-docs/blob/master/X16%20Reference%20-%2009%20-%20VERA%20Programmer's%20Reference.md#chapter-9-vera-programmers-reference https://github.com/X16Community/x16-docs/blob/master/X16%20R...
- kjs3 2y agotwo large breadboards stuffed with 54xx chips There's no need for mil-spec chips for this. Waste of money.
- beepill 2y ago> " I'd probably want to buy an oscilloscope and/or logic analyzer but maybe I could run it slow and use an AVR-8 Arduino to run test sequences." that's literally what i want to do because Im too broke for either lol you can squeeze an arduino's adc utilizing its timers and interrupts instead of using analogRead() in a loop: https://www.instructables.com/Girino-Fast-Arduino-Oscilloscope/ https://www.instructables.com/Girino-Fast-Arduino-Oscillosco... https://digibird1.wordpress.com/arduino-as-a-5m-sample-osciloscope/ https://digibird1.wordpress.com/arduino-as-a-5m-sample-oscil...
- basementcat 2y agoPET used a clone of the Motorola 6845 (also found in MDA and CGA adapters for the IBM PC). https://en.m.wikipedia.org/wiki/Motorola_6845 https://en.m.wikipedia.org/wiki/Motorola_6845 https://retrocomputing.stackexchange.com/questions/7117/how-did-the-commodore-pet-80-column-display-work https://retrocomputing.stackexchange.com/questions/7117/how-...
- PaulHoule 2y agoSee also https://en.m.wikipedia.org/wiki/List_of_home_computers_by_video_hardware https://en.m.wikipedia.org/wiki/List_of_home_computers_by_vi... Note Don Lancaster's technique used for video in some computers https://www.tinaja.com/ebooks/cvcb1.pdf https://www.tinaja.com/ebooks/cvcb1.pdf such as https://en.wikipedia.org/wiki/ZX80 https://en.wikipedia.org/wiki/ZX80 In some strange sense this is like using a microcontroller to implement a CRTC except you're using the main CPU to do the work.
- jecel 2y agoThe first couple of models used TTLs for the video circuit. These were replaced with the 6845 later on.
- detourdog 2y agoI lot of the Apple video is based on the book the tv typewriter cookbook or something like that by Don Lancaster.
- dbcurtis 2y agoExactly. I came here to say that. The amazing thing is Lancaster wrote that book before there was a pc of any kind to hook up to. But he showed very clearly how to generate NTSC monochrome video with a bucket of TTL chips. Such good times and good memories. SWTPC sold a kit of that TV Typewriter that I built. Not only Apple and SWTPC but Sol and mo doubt others basically cloned Lancaster’s design.
- deater 2y agoif you're excited about Apple II graphics, and also about the new Riven remake, but you don't have the VR hardware for Riven, you can try out the recently released Riven-for-Apple-II subset: http://deater.net/weave/vmwprod/riven/ http://deater.net/weave/vmwprod/riven/
- whoopdedo 2y ago> I'm going to break with my usual habit of ][ and use "Apple II" for the rest of the post. It very slightly bothered me that "][plus" was typeset before this, but it was "IIe" and not "//e".
- TedDoesntTalk 2y ago//e is only on the boot screen for the Apple IIe enhanced. The un-enhanced uses IIe.
- pvg 2y agoThe un-enhanced uses IIe It uses 'Apple ][', oddly enough.
- whoopdedo 2y agoI had to be sure there wasn't a Mandella effect. The logo plate had "//e" reflecting the legacy of the Apple ///. (Also seen on the //c). Then the later Platinum version went to "IIe" since it was in the Macintosh & IIgs era. The "Apple ][" in the ROM I'd guess came from how hastily they had to regroup after the Apple /// wasn't successful.
- pavlov 2y ago> "Randomly reading from various memory addresses might give the modern programmer some concern about security holes, maybe somehow reading leftover data on the bus an application shouldn't be able to see. On the Apple II, there is no protected memory at all though, so don't worry about it! Loosen up! The hacker doesn't need a security hole if there's no security." I miss computers that didn't have the capability to send all my important data to an unknown address in Belarus in the blink of an eye. Maybe someone could design a modern desktop operating system whose outgoing network requests are batched and processed once a day, so you can look through the batch before letting it out. This would of course mean that applications must be designed to be extremely thrifty about what data they want to send, or users would simply ban them for making large opaque requests. No more telemetry, no more ad profile updates, etc.
- tossandthrow 2y agoThat would be fun stuff when requesting a web address having to wait for the batch review! That would indeed be a return to the analog world.
- pavlov 2y agoI'd like to have a Slack bot that explains this situation: "Thanks for contacting pavlov. Due to operating system limits, his reply to your message won't be published until 3pm tomorrow. Your patience is appreciated." Would be a stress antidote.
- rbanffy 2y agoPluto will be prime real-estate for the people who don’t like interruptions.
- jandrese 2y agoSeveral years ago I worked on a system that operated quite like this. It used DTN (Delay/Disruption Tolerant Networking) and web proxies to allow really remote villages to get internet by bus or mule drawn carriage or however they got supplies. You would make the request, it would be batched up with all of the other requests and handed off to he supply vehicle that came around every week or twice a week. That vehicle would eventually make it to a bigger city where they had real internet and it would spider out the requests a few layers deep (up to a low number of MB), then the vehicle would make another trek and it would populate a web cache in the villages so someone hitting the same URL would be served a slightly stale version of the content. It also had email so the person who make the request would get a mail stating that it was ready and give them the link.
- robterrell 2y agoThis might be a good moment to drop a thing I made last year but never shared the link for. It's a bitmap editor that outputs Apple ][ shape tables. https://robterrell.github.io/shape_table_maker/shape_draw.html https://robterrell.github.io/shape_table_maker/shape_draw.ht... Apple ][ shape tables were a rarely-used vector drawing technique -- rarely used because they were fairly slow to render and there wasn't great tooling for making them. High level of difficulty plus poor results... it was almost as easy to write blitting code, even with the odd Apple ][ video memory layout, so most games ended up doing that instead. Anyway, if you are curious about shape tables, here's a thing for you.
- deleted 2y ago[deleted]
- rbanffy 2y agoI used them a lot for fonts. The Take-1 Programmer’s Toolkit was used extensively for animations in educational software back then.
- samf 2y agoOne thing I used shape tables for was for a fade-in effect. I would draw my spaceship one pixel at a time, choosing the next pixel at random. (I made a tool to help with this, or else it would have been too tedious!) The shape tables were rendered so slowly that it make the ship "materialize" in a cool effect. After this initial fade-in, I would render the ship more sensibly. Other than this, I never found much use for shape tables.
- alwillis 2y agoI remember making shape tables manually in high school. Talk about a trip down memory lane.
- dtgriscom 2y agoGoodness me. I wrote a simple 2D flying game using potentiometers for steering and shape tables to draw the little airplanes. It was indeed very slow, but still fun.
- deater 2y agothe discrete hardware part of the Apple II is fascinating window into 1970s hobbyist electronics sometimes. In the flashing text mode, you might think the flashing text (also used for the cursor) is done in software or something. But no, it's a 555 timer gating off the video signal for that particular character.
- byteknight 2y agoThis reminds me of when my grandpa told me the clicking we hear when we turn on a turn signal is from the old days when a cover used to visibly/audible "click"/close over the light, mimicking a blinking effect.
- rbanffy 2y agoI always thought it was one of the many relays under the dash.
- sjsdaiuasgdia 2y agoI think your grandpa was messing with you. Flashing turn signals and the click sound came with a 1938 invention which Buick started putting into cars in 1939. There were other turn signal approaches used before then, though not all cars had turn signals. Some of those approaches were mechanical, but still don't really align to your grandpa's claim. https://www.qualityplusautomotive.com/blog/2020/september/the-unmistakable-click/ https://www.qualityplusautomotive.com/blog/2020/september/th... https://www.cartalk.com/blogs/jim-motavalli/strange-true-history-turn-signal https://www.cartalk.com/blogs/jim-motavalli/strange-true-his...
- Dwedit 2y agoThere's a video by Technology Connections all about turn signals: https://www.youtube.com/watch?v=2z5A-COlDPk https://www.youtube.com/watch?v=2z5A-COlDPk Demonstrates thermal-based flashers as well as capacitor-based flashers. They are clicking because metal is moving and hitting metal.
- justsomehnguy 2y ago
- thought_alarm 2y ago> "Randomly reading from various memory addresses might give the modern programmer some concern about security holes, maybe somehow reading leftover data on the bus an application shouldn't be able to see. On the Apple II, there is no protected memory at all though, so don't worry about it!" Funnily enough, protected memory (sort of) arrived with the Apple III a couple of years later in 1980 and it was met with complete disdain from the developer community ("Stop trying to control my life, Apple!"). Apple III ROM, hardware, and kernel memory wasn't meant to be directly accessible from the application's address space. The purpose was to increase system stability and to provide a backward-compatible path for future hardware upgrades, but most users and developers didn't see the point and found ways around the restrictions. Later, more-successful systems used a kinder, gentler approach (please use the provided firmware/bios interfaces please).
- rbanffy 2y agoThe Apple /// is a master class on what NOT to do when designing a computer. Apple still owes us an 8-bit Apple IV computer as an apology for the ///. The best feature is the dual speed arrows - press and they’ll auto repeat. Press harder and they’ll repeat faster.
- PaulHoule 2y agoI remember going to Computerland circa 1981 and they had an Apple /// that they refused to demo for anyone because they were afraid it would burn up. Whatever else might have been wrong about the ///, the /// just plain didn't work reliably.
- rbanffy 2y agoAFAIK, the ///+ solved most of the problems with the ///, but it failed so badly in the market I’m still looking for one to buy for a reasonable price (I want to try to make it do 384x560 graphics, arguably possible with its interlaced mode).
- 2y ago
- pazimzadeh 2y agoRelevant: How Steve Wozniak Brought Color to Personal Computers https://www.youtube.com/watch?v=uCRijF7lxzI https://www.youtube.com/watch?v=uCRijF7lxzI
- deleted 2y ago[deleted]
- PaulHoule 2y agoIt hurts so much to see how slow that dragon head is animated in that Ultima intro. I remember a lot of really slow updating in games for the ][.
- Dwedit 2y agoGlorious 7-bit graphics.
- Bluecobra 2y ago> Unfortunately, the Apple II doesn’t give the programmer any ability to know where in its cycle the video scanner is at any given time. So there is no way to race the beam on an Apple II like an Atari 2600/VCS can?
- jdswain 2y agoNo, and there was no (easy) way to detect the vertical retrace. For a lot more on that topic have a look at the Apple II mouse card, they needed to synchronise with the video and did work out a software based way of doing it, but the final product added hardware to make it possible.
- deater 2y agoyou can race the beam, I've written many demos that use this. On the original Apple II you have to do something called "vapor lock" or "reading the floating bus" where you draw a pattern to memory scanned by the video circuitry, then read an unmapped memory address and you get a "ghost" of the last value read by the video circuitry due to capacitance on the bus. You can then find the beam location, but from then on you have to cycle-count everything. Sather describes this in his book.
- BarbaryCoast 2y agoDon Lancaster had a software-only method for syncing to the video scan, called the Vaporlock. Which is a play on "genlock", which TV production systems called their hardware to sync to the scan for doing overlays. Don's technique relied on the fact that the video hardware in the II line scanned memory that was outside the video frame. He put magic values in those extra bytes for each scan line, and his software could detect where the beam was on each line. (I've probably messed up the explanation; it's from memory of 40 years ago...) The great thing is that you could mix video modes within a single scan line, allowing you to put text on the left edge of a HIRES graph. The downside is that the Apple can't do anything else, because his code is running in an exact timing loop to stay synced. There were other solutions, but those were all hardware-based.
- TMWNN 2y agoWoz is one of the greatest engineers of the 20th century, and the Apple II demonstrates his talent. But his brilliance at simplifying things always straddles the line between optimized and overoptimized. The Disk II might be his greatest feat at doing more with less, while the video circuitry falls just into overoptimization, given the color fringing, NTSC dependence for color, and lack of lowercase. Integer BASIC is somewhere in the middle; great performance (especially given (or maybe because) Woz knew nothing about mainstream BASIC), but the code is so tightly written that it was easier for Apple to license Microsoft BASIC than to add floating-point code to Woz's work.
- ffhhj 2y ago> Many vintage computers are defined by their fonts. But the article doesn't mention my favorite ASCII table ever, known as the "running man character set": http://www.lazilong.com/apple_ii/a2font/readme.html http://www.lazilong.com/apple_ii/a2font/readme.html It includes open and closed apples, sand clock, and elements to build GUI's: windows, tabs, scrollbars, and even a pointer!