Chapter 2

The Original Boing Demo:

 

The original demo, archived with sound samples and icon in the Amiga’s standard .lha format, for running on a real Amiga or Amiga emulator.

Assembly language source code to the original demo, with comments by Harry Sintonen.

The Boing demo reconstruction:

Stage 1:

This first stage of the reconstruction opens a screen, clears it, and draws the static image of the ball there.

 

Stage 1 executable, for running on a real Amiga or Amiga emulator.
Stage 1 C source code

Stage 2:

This second stage of the reconstruction adds the rotation animation to the ball, which is accomplished through palette color cycling only.

 

Stage 2 executable
Stage 2 C source code

Stage 3:

This third stage of the reconstruction adds the horizontal and vertical bouncing motion to the ball, which is accomplished entirely through manipulating the X and Y offsets of the viewport.

 

Stage 3 executable
Stage 3 C source code

Stage 4:

This fourth stage of the reconstruction adds the static, non-scrolling background.

 

Stage 4 executable
Stage 4 C source code

Stage 5:

This final stage of the reconstruction adds the sampled “boom” sound.

 

Stage 5 executable
Sound samples
Stage 5 C source code

13 Responses to “Chapter 2”

  1. Hi,

    I bought your book and am thoroughly enjoying it so far. However, I am reading it as a Kindle book on my ipad and being as this web site is an accompanyment to the book, it would be great if the videos were ipad friendly so I can simply swap from kindle to safari as required. As it is, I have to fire up my PC in order to view the videos.

    Other than that, great job on the book and helpful examples.

    Cheers,

    Barry

    • Ali Farhat Says:

      Baz, sounds like you’re a fellow Aussie. Too right, absolutely loving the trip down memory lane and the education in the process. Shame about the fruit pad you’re running though. I would have loved to hear that resounding bounce sound on some amplified speakers, would have been a sight to behold!

    • I am reading on an android tablet and I was thinking the same thing. Would be nice to have a cohesive multimedia experience!

  2. […] today. You can have a look at the table of contents and a sample chapter. Associated with this book there is a companion website with a wealth of material, such as videos demonstrating the capabilities of the Amiga. It is worth […]

  3. Hi,

    I’ve tried to load your executable version 5 on two different Amiga 500 (Kick 1.3 with and without additional 500 MB RAM expansion) but it crashes right after the start (when the ball first hits the floor). In the emulatore it works fine.

    Did you test the program on real hardware? What could be the problem?

    thanks!
    Stefan

  4. At first,
    Congratulations for your work of releasing both the original source code content of the boing demo and a modern version trying to refactor the demo using the C language instead of using only assembly and (likely) non OS friendly procedure like direct hardware accesses.

    However there is a side effect that I found out while looking at the two versions of this demo. If you play the stage 3 demo, you’ll discover that the boing ball shadow is clipped by an invisible “wall” on the right edge of the screen, while the original demo does not have this artefact. This can be possibly be caused by an overscan graphics mode being used in the original code, or a miscalculation of the ball trajectory that makes it bounce to late…
    Currently I am trying to render the demo with an FPGA board with a VGA output connector (the learning curve is steep).
    Again thank you for having written such a fine book of the Amiga history and the milestones achieved by the Amiga hardware.

    • David Cameron Says:

      Benoit0123, I think you are right, I noticed the original demo reverses direction sooner on the right edge of the screen. Should be simple enough to fix. I just made a javascript version for fun and noticed that. Mine isn’t perfect but it can be tweaked.

      https://www.khanacademy.org/cs/amiga-ball/5823544081514496

      • SaganAndroid Says:

        David, I loved your javascript boing demo. I’m inspired to learn this heathen language now. Not knowing a thing about it, I contented myself with a spinoff related to Beetlejuice.

        I’d like to ask you a few questions about your program. How do I reach you?

      • SaganAndroid Says:

        OOPS, I forgot to link to my Beetlejuice themed spinoff on the javascript Boing demo.

        https://www.khanacademy.org/computer-programming/spin-off-of-amiga-ball-beetlejuice/6071350332522496

        My inspiration due to your javascript boing demo was shortlived. Gotta say, Javascript For loops are ugly as sin. Look at this syntax:

        for (var vlines = 0, xpos = 0; vlines < 16; vlines++) {

        EWWWW.

        And how is

        console.log ('hello world');

        better than

        ?"hello word"

        The hell? Think I should stick to Assembly language, AMOS, BLITZ and maybe Friend.

  5. Very impressive as a Javascript demo.. Congrats!
    Benoît

  6. Hi, going through the book and enjoying this description on palette cycling, something I did a lot back in the day. 🙂

    One thing I was hoping to see was the real original boing demo that you mentioned being displayed on the breadboard amiga at CES, the one with no sound and only bouncing up and down. I was hoping to see that old code running, not recreated. Is that lost forever?

Leave a Reply to Bazza Cancel reply

Your email address will not be published. Required fields are marked *

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