Does This Demo Remind You Of Mario Kart? It Should!

Here’s a slick-looking VGA demo written in assembly by [Yianni Kostaris]; it’s VGA output from an otherwise stock ATmega2560 at 16MHz with no external chips involved. If you’re getting some Super Mario Kart vibes from how it looks, there’s a good reason for that. The demo implements a form of the Super Nintendo’s Mode 7 graphics, which allowed for a background to be efficiently texture-mapped, rotated, and scaled for a 3D effect. It was used in racing games (such as Super Mario Kart) but also in many others. A video of the demo is embedded below.

[Yianni] posted the original demo a year earlier, but just recently added detailed technical information on how it was all accomplished. The AVR outputs VGA signals directly, resulting in 100×120 resolution with 256 colors, zipping along at 60 fps. The AVR itself is not modified or overclocked in any way — it runs at an entirely normal 16MHz and spends 93% of its time handling interrupts. Despite sharing details for how this is done, [Yianni] hasn’t released any code, but told us this demo is an offshoot from another project that is still in progress. It’s worth staying tuned because it’s clear [Yianni] knows his stuff.

VGA may not be what it once was in the world of desktop computers, but it’s fertile ground for hacking projects. We’ve seen an Arduino drive a VGA monitor like it was an Etch-a-Sketch, and how to bit-bang VGA in under 1k.

13 thoughts on “Does This Demo Remind You Of Mario Kart? It Should!

      1. And probably read out into a buffer chunks at a time ready for each scan-line or so.

        Then there is those moments between displaying something, moving a line down and VBlank where the buffers can purge and/or update.
        Also between those moments, other things can be performed.
        See Quinn Dunki (Blondihacks) Veronica project as an example of these methods.

        That’s just my guess though.

    1. Got a problem with that too…
      an 256x256x8bpp bitmap is 512KB…
      He wrote:”The displayed texture resides in an aligned 64KB block in flash.”
      And the MC only have 256KB of flash.
      so ?

  1. Isn’t this just accessing an array with wrapping and two run length counters for the pixels to stretch them in proportion to the vertical position on the screen? The rotation is just stepping the y array variable at different positions relative to the x.

Leave a Reply to triton_9Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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