Apple II Megademo Is Countin’ Cycles and Takin’ Names

The demoscene is an active place to this day, with enthusiasts around the world continuing to push the envelope as far as the capabilities of machines are concerned. [Deater], along with a skilled team, produced this Apple II Megademo which won first place at Demosplash 2018.

The demo starts with an intentional tease, with an emulated C64 BASIC startup screen which splits to reveal the title card. White-on-blue text isn’t the easiest on the Apple II, due to palette limitations, but it’s necessary for the joke to work. The following scenes make heavy use of mode-switching techniques in the middle of drawing the screen. Single screens are made up of various sections in LORES, HIRES, and even text modes. The term “cycle-counting” refers to the fact that the demo is written to operate in a cycle-exact fashion. This is necessary to achieve the mode-switching effects and to make the most of the limited resources of the Apple II.

It’s a demo that, like many others, does the right things in the wrong way to achieve its impressive results, and is a worthy competition winner. [Deater] has kindly provided an FAQ and source code for those who wish to study it further.

If you’ve written a mindblowing demo yourself, be sure to notify the tips line. Video after the break.

 

23 thoughts on “Apple II Megademo Is Countin’ Cycles and Takin’ Names

  1. From FAQ:
    “This demo is awful compared to the awesome demo I made for a C64.
    Yes, but I doubt your C64 demo will run on a machine from 1977 that’s more or less completely constructed out of 7400 series logic chips.
    Also your C64 demo can’t even load itself off of disk without the help of an additional 6502 processor so I wouldn’t get too excited about how awesome it is”

    Looks like invitation for flame.

    This C64 demo can be loaded from tape https://www.youtube.com/watch?v=ISy-TpZCAqA

    The gap is huge even betewen that demo and ZX spectrum: https://www.youtube.com/watch?v=w6j9UapLPVM but it seems more on the design side of things rather than technical execution – my both examples use text mode extensively.

    1. Ugh, clicked “report” by accident, sorry about that.

      Anyway, yes I was sort of mildly trolling the Commodore crowd (see the first scene of the demo) but mostly because a lot of people seem to think all 6502 chip computers should be equally capable, when really it’s the peripherals that matter most.

      Also comparing a C64 with an Apple II that came out in 1977 is a bit unfair. I’d be more impressed if you came up with some impressive Commodore PET demos, as that’s the same timeframe that my code is targeting.

    1. The Vic II and Sid came out a half decade later which was a long time in computing during the 1970 to 1980s.
      Probably like 10+ years of technology difference today which shows in the price of the two machines.

  2. the portraits and image of a planet are scaled incorrectly. scaling seems like a basic indicator of knowing how to reproduce images on a computer. when a major mistake like this poor scaling happens, the wrong pixels can heavily detract from the quality parts of a demo. (not much time here to give praise and other constructive criticism, sorry.)

    1. I think that’s an artifact of my NTSC capture card, the program I used to grab the video in Linux, and then youtube. Looking at things on an actual CRT display things are less stretched out.

    1. I’m working on a FF7 clone, also for the Apple II, where the guinea pig eventually becomes one of your party members. I need to finish it at some point, it was that project which led me to get distracted by entering the demoscene.

      1. Interesting. Two possibilities. One, it is known that some cards (though I don’t think there’s a list) affect the bus capacitance enough that the “vapor lock” trick doesn’t work reliably and you can’t get the exact beam position.

        The other is if your card was in slot4, then the code that assumes a mockingboard is there might have been confusing things.

  3. I had the privilege of seeing this demo in person at KansasFest, and I can say without hyperbole it is one of the most astonishing pieces of work on the Apple II in a very long time.

    The “problem” with a demo like this is that few people are left who appreciate how difficult it is to get this machine to do what you are seeing. The Apple II has no interrupts and no support hardware of any kind. To appreciate this demo, you need to understand what having no interrupts means. That means every branch in every piece of this code is exactly the perfect number of cycles so that the frame starts drawing at the right place each time and the picture is stable. There is no vertical blank signal. Want to change the pitch of a note in your music a little? That throws off all the cycle counts in every part of your code, so start recalculating and move cycles around to make it all line up again. Splitting video modes at all is a pretty epic stunt with no VBL and no interrupts. To do it to this extent, with music and animation is next level. Oh, and that music? It’s all busy loops ticking a one bit speaker precisely in the same cycle counted loop as everything else. No interrupts, no sound chip to do things asynchronously for you. If your animation loop takes one cycle too long, your music sounds wrong.

    I’ll also challenge the statement that this is “the right things done the wrong way”. The ONLY way to do what you see here is the very very hard way. Respect.

    Amazing work, and well deserving of first place at Demosplash, Deater and team.

    The rest of you commenters, get off my lawn. Rant over.

      1. even places like pouet don’t appreciate this completely, as Apple II was not really well-known in the traditional demoscene parts of Europe.

        The benefit at Demosplash was I gave a 45-minute presentation on low-level Apple II programming a few hours before voting, which I do think helped the appreciation level.

        This was one of the more difficult programming tasks I’ve ever done, but I’m sort of resigned to the fact that there’s only a handful of people left in the world who appreciate it. Part of the problem is I really like Apple II Lo-res mode for the colors, relative ease of programming, and low memory footprint… but it looks like a pixelated mess of blocks to the modern eye.

    1. Nitpick:The demo seen here uses a hack from the ’80s called Vaporlock to get a VBLANK signal on the apple II.
      I don’t mean any disrespect Ms. Dunki. I read every Veronica post and am very impressed by your steam engines.

      With no interrupts, cycle counting is necessary at least until the last mode switch. The people who did this must be brilliant, and also completely nuts. This is in a completely different league from everything else i’ve seen on the Apple II+, most of which had OK tech but ugly graphics.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.