HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Bad Apple on an Apple //e

Kris Kennaway · Youtube · 119 HN points · 0 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Kris Kennaway's video "Bad Apple on an Apple //e".
Youtube Summary
Video is playing from a compact flash card using a CFFA3000. The machine is running at standard 1Mhz and has no other hardware assistance.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Mar 25, 2021 · 119 points, 64 comments · submitted by apricot
marcodiego
None of these bad apple demos impressed me more than the master system one: https://www.youtube.com/watch?v=eLRtjkkBto0
argvargc
Wow, it's full colour with PCM music and looks like its only a 4.5MB zip download. Definitely way beyond any others.

(For anyone unaware, the Sega Master System CPU was a Z80 @ 4Mhz, and the system had 8KB RAM and 16KB VRAM.)

Video player details here: https://github.com/gligli/tiler

apricot
The author gives some technical information in this Reddit thread: https://www.reddit.com/r/apple2/comments/mbrh2f/playing_vide...
JKCalhoun
Would there have been a 95MB disk drive available for the AppleII in those days? (And at what cost?)

Amazing though.

tambourine_man
It was about a megabyte per cassette tape, depending on the encoding, right (counting both sides)? Doable, with lots of tape swapping, I guess :)

Though probably a shorter version would be nicer

[edit] Forget that, from the Reddit link: “We end up reading data at about 533KB/sec, and are I/O bound.”

apricot
A custom-made cassette reading peripheral card in every slot, and eight cassette players running in parallel at high speed?
tambourine_man
I like how you think :)
ddingus
Lol, this should be done.

Dealing with sync issues would be top of the list.

Maybe stagger them, so they can be stopped every so often. Reach key data, kill motor, wait, start motor?

Or maybe just toggle the motor line quick? Just enough to slow it a little!

All kinds of insanity possible.

Stereo tapes could possibly deliver 2400 baud x 2.

Eight 4,800 baud tapes * 2 minutes 'ish

I am coming up with 0.5 to 1MB range numbers :(

But I really like this craziness!

setpatchaddress
Not a chance, no. Here's something from 1985:

https://www.atarimagazines.com/creative/v11n8/36_The_Sider_1...

> Five years ago I drooled over the new 5Mb Winchester hard disk drives being introduced to the Apple II market. Although I knew how useful a hard disk could be, I also knew that I would never be able to justify the purchase of a $3000 mass storage device for a $2000 computer. I also knew that I would never be able to fill 5Mb of disk space.

> How times have changed. Today, a full fledged Apple IIc or IIe costs a little over $1000. And a 10Mb hard disk drive costs only $695. That's right. First Class Peripherals offers the Sider, a hard disk drive with 10Mb partitionable among four operating systems for $695.

kevin_thibedeau
It would have been possible with a SCSI card and multiple drives.
dhosek
When I bought my first PC right out of college in 1991, it had a 200MB hard drive. A professor I mentioned this to said that I was crazy and that I'd never fill 200MB.
ddingus
He's running code out of the region of memory that the CF card dumps the data from the disc to!

Basically it's an entire 90 kilobyte program that draws the animation! Edit: 90 Megabyte!

Something like this could have been possible back in the day, given a DMA capable i/o transfer device.

LDA #PIXELS

STA #SCREEN

. . .

rangibaby
It’s interesting to me that someone smart enough could have thought of this in 1981, but considered it impossible because 90MB was an absurdly large amount of data
ehaliewicz2
Compiling bitmap sprites into code like this was pretty common actually.
ddingus
And from what source material?
Tabular-Iceberg
Film and video certainly did exist in the 1980s.
danparsonson
But could anybody digitise it?
ddingus
This!

Mechner pioneered doing that from VHS when doing his game Prince of Persia.

Something like Bad Apple would be a heavy lift.

retrac
There are experiments with full motion digital video dating back to the 1970s. While computers certainly weren't fast enough to stream video data to or from memory (and you'd fill a supercomputer's entire RAM with 2 seconds of uncompressed video), video could be DAC'd in real time while streaming off digital tape, and vice versa. And such tape data could be read in, processed and written out by a computer (slowly...)

Still, while technically possible to do this sort of video compression in 1981, it would have involved extremely specialized hardware to scan the film in the first place, and a good amount of compute time on a real big machine like the Cray-1 to do the compression. (And Rick Astley wasn't a star yet, so what would have been the point?)

Fun fact though: just two years later, Cyndi Lauper's iconic music video was edited in digital form, including the insertion of computer-processed video effects: https://youtu.be/PIb6AZdTr-A?t=90 While such things as picture-in-picture are so common today we don't even notice it unless pointed out, that was mind-blowing at the time. But it took hardware worth a million dollars due to the megabytes of RAM required to fit the 10 second clips they worked with.

apricot
The transcoder that he wrote to convert the source video to a 90 MB 6502 program that draws the animation is pretty nifty too: there's no time to update the whole screen between frames, so he diffs them and updates as many pixels as he can, starting with the ones that are most noticeable according to a perceptual distance metric. Details in this talk from two years ago: https://www.youtube.com/watch?v=wM3deQAgMpE
ddingus
Thanks for linking his other talk.

The result is pretty great. I will enjoy the details.

tambourine_man
This is freaking amazing.

Is that just me or is retro computing all the rage right now?

I don't know if Google's algorithm has taken a hint, but it seems like it's everywhere I look.

ddingus
It has been growing nicely for a few years.

The pandemic helped retro, IMHO.

Whatever the cause, I love to see all the stuff people are doing, and the whole scene reminds me how far we have come.

[Looks over at 1Mhz Apple //e, thinking about some fixed point code to drop into that retrogame project...]

What I did was buy some goodies. 16Mhz CPU card, CFFA for disk storage. Floppies are getting super long in the tooth.

Now the machine can be really quick! Lots of fun possible.

charcircuit
Why not just emulate an older computer? Using old hardware like that will be slow and inconvenient.
kitsunesoba
Depends a lot on the machine in question, but in many (if not most) cases emulators aren’t particularly accurate and can sometimes be missing major features.

For example if you want to run classic PowerPC Mac games with 3D graphics, you’re going to need an actual old Mac because no emulators currently implement enough of a GPU to run them.

Aside from that, with emulators you’re adding layers of indirection and modern technology with unavoidably higher overhead (like USB) that impact latency — even if emulated machines are faster in some ways they can be less responsive than actual hardware.

The best of both worlds are hardware recreations of classic machines using modern technology, but these are exceptionally rare. It’s a shame because with how much everything has shrunk, it’d probably be possible to build a meta-retro-box about the size of a NUC that contained hardware for a bunch of different systems.

ddingus
There are various FPGA solutions out there now.

I have run some on my DE2 FPGA.

This can be sweet and can really deliver the experience and can even use original peripherals, input devices, displays.

I am settling on one, maybe two retro hardware setups. That is all the time I have. If I shrink it down to one, it will be an Apple //e Platinum. It is my fave.

For gaming and other experiences, the FPGA options are looking like where the retro action will be at for more people as hardware ages, gets rare, whatever.

phkahler
You can't get lower key-to-screen latency than an 8-bit computer on a CRT.

Well, most of them. My Interact draws characters pixel by pixel.

ddingus
Bitmap character displays were kind of neat back then.

My Model 100 does the same.

charcircuit
>You can't get lower key-to-screen latency than an 8-bit computer on a CRT.

Why? My current monitor has a refresh rate of 144Hz and a response time of less than 1ms. This means that it will have lower latency than a CRT on average. I am sure you can produce a video signal on something other than an 8 bit computer.

phkahler
But there is a lot of software on your system. The only thing in your favor is the higher refresh rate.

When the 8bit system gets a key press, it literally writes one byte to memory to put it on screen. A modern system will have to paint a glyph - which is super fast - but then may have to go through a compositor and possibly wait for V-sync. You're luck if the software stack doesnt introduce at least one frame of delay.

ddingus
And that 8 bit computer could drive higher refresh rate devices and still be lower latency, or at the least, par.

At this point, there are some really fun options for this kind of thing!

This chip: https://www.parallax.com/propeller-2/

is 32 bit, can run at a few hundred Mhz and has a very simple, retro feel, in that the 8 processors run wither either concurrently and independently, or can be used in parallel.

The fun thing about all that is being able to build up fairly sophisticated applications or perform advanced control tasks without needing the complexity of a RTOS.

In that low latency case, one core would be delivering a character or tile display, maybe with sprites, and once that is done, your programs can be simple, write that byte to screen type. Frame locked, low latency, single or partial buffered display schemes are all possible, even racing the beam style.

Display support exists from old school monochrome 50 / 60hz composite through VGA and HDTV analog at 1080p, to reasonable HDMI.

Racing the beam on an HDMI display is possible much like a CRT, depending on how the display buffers the bitstream.

I like to treat these like new retro devices. Good fun and practical. (Have one device in the field using the simpler, original edition.)

ddingus
Why not indeed?

For most development, emulation is great. That is what I do a lot of the time. Having my modern environment handy makes old school dev targets easy, fast and fun.

Sometimes, it makes sense to get real i/o and interaction. Here are a few examples:

* What are the performance differences between fast emulation modes, recently made CPU accelerator hardware, old accelerator hardware, and a stock machine?

That varies a lot! And emulation is not necessarily accurate. In the case of recent hardware option cards, it is not accurate at all.

There are times when it makes sense to test, or attempt something new, and doing it on the real machine is always valid. Emulation may or may not be, depending.

* I am making some low latency controllers for younger ones, and me to be honest, to game on and experience history.

Going down this road has been fun. I got a couple great CRTs, have made some gaming controller hardware, and my young ones notice! All sorts of questions, observations.

Dark room, late night phosphor trails, just by way of one small, but fun thing. They loved gaming that way. Have asked a few times to do it again. Fine by me.

* I want to program on a 65816, and that was an upgrade from back in the day I never did. My accelerator card could come with that CPU instead of a standard, 8 bit 6502 variant.

Emulation may cover this case, bit it may not do that accurately given newish hardware options I have on the machine.

* I do use the machine for the following:

Writing. Old school, comfy keyboard, display helps me to focus and write a bit differently. This is straight up creative writing and it is fun.

Electronics. Have always done this and will continue. A fused card amd ribbon cable makes learning and building fun. I can use the computer to generate inputs, display results, etc.

I got started with embedded systems this way and love doing it. Have learned a ton on an Apple, sometimes Atari machines back in the day. Still am.

Gaming, and for me that is Nox Archaist more than anything else. I don't have a ton of time, so I like to make it immersive and fun.

First time I sat down in front of one of these machines, actually a Plus model, not a //e Platinum, is an experience I remember vividly. Just last weekend I did that again, and we have come a long way!

That perspective is nice. Has value. I am happy it all can work still.

Edit: Frankly, a real system on a quality CRT is a great experience. Software emulation does not really do that well.

Hardware, FPGA can, and I bet it grows nicely over the next decade.

Software emulation, again, is my goto for dev projects. I do more than software on my retro hardware, so I maintain good quality retro hardware, and that leads me to the last reason:

Other people are making cool stuff! We all buy kit from each other and it is a lot of fun.

woodrowbarlow
the "kit" business model as a side-gig is really attractive to me. hardware designers who create some neat cartridge or modchip, order a few thousand blank pcbs, and sell the blanks along with a link to order all the components from digikey. the overhead for this business model is very low; pcbs don't take much room to store and managing orders at that scale is relatively simple. best of all: due to economies of scale, you can open source your hardware design without making much of a dent in your sales. since you bulk-ordered the pcbs, you can sell them cheaper than it would cost someone to make their own from your schematics (and you still turn a profit).

now if only i knew more about hardware design...

ddingus
I have been learning. Have help. Mostly buying others kits, but have exchanged boards and collaborated a few times.

That is another fun electronics / retro thing. It is cheap to get, say 10 of something. Mail 'em off to friends for group tinkering.

charcircuit
It also saves you thousands of dollars from having to get something certified in the US. A few years ago I wanted to develop a hardware product, but I gave up once I learned how expensive certification and licensing can be. If you want to sell a rasperry pi with an LED and resistors attached to one of the GPIO pins you are looking at 5 figures worth of costs just to be able to sell a single unit in just the US.
anyfoo
In the context of it being a hobby here, you can do it however you want, and there are a lot of different reasons using these old computers one way or another. Some like finding out every detail of the hardware, some enjoy the challenge of breaking its known constraints. Depending on the exact situation, an emulator might work or not.

I'm currently repairing old HP calculators. All of those can be very accurately emulated even on my iPhone, but I did it for the challenge, for the learning experience, and really because I just like the feel of the keyboard and the unit itself--and the broken ones are much cheaper on eBay.

In the cases where an actual need is to be fulfilled, e.g. for business reasons (it happens), if an emulator works it can easily be the best possible way. If hardware is involved (including old disks), again it might not.

charcircuit
>If hardware is involved (including old disks), again it might not.

Ideally this would be emulated too.

anyfoo
My point was if you need to read stuff from old disks. You might not need an old computer and the exact disk drive (especially nowadays), but you certainly will need a disk drive of some sort.
grishka
> and the whole scene reminds me how far we have come.

Yeah, overcomplicating every single thing, piling tens of layers of ever more generalized and inefficient abstractions on top of each other, and so on.

Imagine not needing several gigabytes of RAM just to browse the web or use instant messaging. Imagine software developers actually understanding what exactly they're doing and what consequences their choices have.

I love old offline-first software. It was never rushed and was not made to be constantly updated. It just did its job.

retrac
Much of it is a tradeoff between features, generality and bloat. A good chunk of that gigabyte of RAM to render a webpage goes into stuff like vector font rendering so it can display nicely at any size on any display. And Unicode handling so it can display Chinese and Russian as well as English. I suppose both outline fonts and Unicode are bloaty in their own right; such allegations have been leveled against them before. Still, those sort of features come with pretty significant cost and are largely invisible until you need them.
grishka
I am Russian, I know this whole encoding problem first-hand. I'm genuinely envious to people who can get by with just a single Latin-script keyboard layout.

Unicode and vector fonts have been part of all operating systems for at least 15 years. Mac OS X 10.0 that came out in 2000 and ran on 128 MB of RAM and a slow by modern standards single-core G3? It supported both these things with ease. Windows has also had W versions of all API functions that accept strings, and supported TrueType fonts, for as long as I remember. (For example, MessageBoxA accepts char* in the current system encoding, like cp1251 for Cyrillic, and MessageBoxW accepts wchar_t* which is UTF-16.)

So, no, it's most definitely not that. It's most likely the fact that people use too much abstraction to achieve simple things.

anyfoo
Imagine losing all your work because a stray pointer in your word processor mistakenly pointed to a hardware register. Imagine not being able to upgrade the hardware or even the software, because programs access hardware directly and directly interact with internal OS data structures. Imagine having to essentially restart the computer and go through minutes of loading time to look something up in another piece of software.

I'm a big retro computing enthusiast, and I'm not happy about the current state of abstractions (especially with web stuff), but there's definitely been advancements also.

ddingus
Interestingly, one could run multiple instances of retro computers and their environments and get many of those advances.

Just a random thought.

grishka
Actually yes, by running retro software in an emulator on a modern system you're getting mostly best of both worlds.
grishka
Virtual memory and memory protection are good things, there's no denying that. As are operating systems with clearly defined APIs, drivers, and a clean separation between kernel space and user space.

But I would still say that even with those problems present, old software does feel quite a bit more reliable than the modern one. Things generally don't break themselves because they've auto-updated while you weren't looking. And UI doesn't change on its own because there's a thousand server-side toggles for A/B tests.

Old software generally was made as a tool, it served its users. Modern software is made to pursue its developer's own agenda first and foremost.

anyfoo
I'd be careful whether you're not looking at things through nostalgia-colored glasses, as humans are well known to do.

Computers crashed and exhibited data loss all the time back then. PCs came with very prominent reset buttons, and when both Linux and Windows NT came up, the prospect that you could run your machine for an entire day without having to reboot was a revelation.

It wasn't different on 8 bit micros: My C64 was very easy to upset, and I bet most people turned it off and back on to get it into a known state when switching programs, instead of risking that the previous software left some interfering bits somewhere.

Sure, it was easy to power cycle a C64 and took mere seconds, but it was also very necessary. Well into the 90s there was a strong general attitude of having to reset every now and then just to keep things from diverging too badly.

Computers crashing, hanging, and losing data was so ubiquitous that it was part of mainstream humor much more than it is now. Then, towards the end of the 90s, when things started to get better, people were so proud of uptime, that they used to brag about it in forums and chats.

Nowadays, my computers, smart phones and similar devices usually run for weeks, pretty much only rebooting for software updates. That isn't always the case, but it's certainly orders of magnitudes better than the very fragile balance back then.

grishka
Don't get me wrong, modern technology is superior in many ways. The problem I'm picking on here is that of the conflict of interest between the users and the developers. And this is absolutely not helped by the proliferation of predatory code signing and governments always siding with corporations when people try to take matter into their own hands.

The problem with modern technology is that many of its upsides are compensated by software developers. You know, "disks are big, networks are fast, memory is plentiful, you don't need to count CPU cycles in $year" kind of mentality.

> Nowadays, my computers, smart phones and similar devices usually run for weeks, pretty much only rebooting for software updates.

On my macbook, something is leaking memory. I'm suspecting the nvidia GPU driver. I have to reboot it every week or two or else it'll start freezing even while I'm typing something.

rrdharan
50 years from now: “we backported <AGI> to an AMD Ryzen with only 64GB of RAM and 16 cores”...
cromwellian
C64 version using VQ compression: https://www.youtube.com/watch?v=OsDy-4L6-tQ

A much much more impressive display of the same tech in this Onslaught Eclectic demo by the same author:

Real time decode of video and audio from floppy at 16fps https://youtu.be/FTtKHLZTbtA?t=713

wiz21c
Yep. Doing it with a HD is soooo much easier it's not even funny. Onslaught is definitively 10000x much more impressive. I can't resist to post my own version on Apple 2 too (without sound because I was not fluent with MockingBoard at the time):

https://www.youtube.com/watch?v=IiSFeqedcho

Compression is the real deal !

tasty_freeze
Video on a TRS-80 model 1/3/4:

https://www.youtube.com/watch?v=Ah9HSCZzQI0

foft
JACs version for the Atari 400/800 is also impressive. Using the ANTIC for character set compression and displays as overscan. https://www.youtube.com/watch?v=tiLB8PQUJtc
flobosg
By the way, the Bad Apple!! video has been ported to several retro platforms: https://en.wikipedia.org/wiki/Bad_Apple!!#Demoscene
PostThisTooFast
What is the origin of this "Bad Apple" video, and why is it everywhere all of a sudden?
dwheeler
Quick explanation: the original song is from one of the video games in the video game series Touhou. The creator of the video game series allows fans to create derivative works. As a result, there are lots of interesting works that its passionate fanbase has created, and many of those works build on others' works.

As more examples, here are more recent videos also inspired by the Touhou series: https://m.youtube.com/watch?v=xRSlq42_sUE&vl=en

https://m.youtube.com/watch?v=KjJMWj6BYhY

dwheeler
The video's been around since 2009. Video: https://m.youtube.com/watch?v=FtutLA63Cp8

Wikipedia article: https://en.m.wikipedia.org/wiki/Bad_Apple!!

I recommend watching this video, "Bad Apple explained:History and Analysis": https://m.youtube.com/watch?v=6QY4ekac1_Q It's fascinating.

I think this video is a fabulous example of community creation.

numpad0
https://www.nicovideo.jp/watch/sm8628149

No one involved complained as long as end result remain roughly BY-NC and the music is cool so everyone just took it and put into various projects, which only made it increasingly famous.

The original song was for the PC-98 game by ZUN, vocal remix was by Alstromeria Records, I don’t think video creators for the concept and the famous version has preferred names to be associated with.

krapp
https://www.youtube.com/watch?v=9lNZ_Rnr7Jc
meibo
Because it may not be obvious to everyone: Bad Apple is a music video from the Japanese video game series "Touhou" which is sort of a fan favorite among the crowd that would port FMV to retro systems.

It's not really all that recent, if you put it into YouTube you'll find ports of it to all sorts of retro consoles and PC's all throughout the last century. I assume it's also quite popular for this use case since it's monochrome.

None
None
anyfoo
It would be a shame not to mention Jim Leonard's 8088 Domination, which pioneered (I think) the whole idea in 2014 for the original IBM PC, by also converting Bad Apple as full-motion video into 8086 machine code (8088 is the same software-wise)! https://trixter.oldskool.org/2014/06/19/8088-domination-post...

The video is linked at the top of the excellent writeup, the Bad Apple part starts after an initial color video part.

It's truly amazing, and I wonder what I would have felt if I had seen that on an IBM PC back in its day.

prpl
Pioneered? I remember creating videos for my TI-83+ in 2000 (z80):

https://www.ticalc.org/archives/news/articles/4/41/41557.htm...

anyfoo
Thanks, I wasn't aware (hence the "I think" in parentheses in my original comment). It's not entirely clear from the very short article, but "outputting a compiled TI-83 assembly program" seems to indicate that that was indeed a similar approach already.
Klaster_1
I still remember how suprised I was when I saw Jim's familiar face in "8088 Domination" credits. He's a co-founder of MobyGames, to which I dedicated several years of my youth and still remember fondly. If you read this, thank you.
rangibaby
> It's truly amazing, and I wonder what I would have felt if I had seen that on an IBM PC back in its day.

I felt the same way about the 8088 MPH demo, knowledge that the original IBM PC could do that would have had unimaginable effects.

HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.