Super Mario Bros. - FPGA

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
14,486
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 20, 2009

This was our final project in the digital electronics lab, where we programmed a digital synthesizer on an Altera DE2 FPGA development board to play the Super Mario Bros. theme. The sound is heard through a crappy 3"-speaker connected to the board's audio jack.

The timing may be off at some point, but it seems to get itself together pretty soon.

To do this, we used three channels of square waves (to emulate the annoying NES sound) which were defined as a digital sequence of amplitudes. The frequencies of the waves were entered manually and assigned to 8-bit "key codes", which represented the different notes of a chromatic scale. Another 4 bits were needed to define the tone length.

Basically the entire song was "translated" from regular notes into these 12 bit numbers, and written by hand into a state machine for each channel separately, whereas each channel needed around five hundred notes..

Enjoy! :)

Category:

Music

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (BassistOfTheFall)

  • Great programming!! What kind of VCOs did u use?

  • Thanks! We just made use of the board's integrated 50 MHz Oscillator as a clock for the signals, I don't know how it's designed.

Top Comments

  • "annoying NES sound"?

    o_O

see all

All Comments (13)

Sign In or Sign Up now to post a comment!
  • @scorpion8588 How do you divide it into 3 channels? And would this also work on a CPLD?

  • To see if I understand.

    1.) Use the one 50 MHz oscillator and divide it into three different input channels?

    Channel 1 = 5 V Channel 2 = 3.3 V and Channel 3 = 1.5 V?

    2.) No idea what 8 bit key codes works

    3.) 4 Bits used to decide how long one note will be last

    5.) State machine, something like

    Channel 1 plays note 1 for X seconds while Ch 2 plays Y and Ch 3 plays Z for 4 sec next Ch 1 plays Y ch 2 plays x ch 3 stays Z, etc.

  • hi, care to share the code for this?

  • I agree with endesigner... brilliant it takes me back, and is there any chance of sharing the source code??

  • Genius!!!

  • This a DE2-70? I have a spartan currently, just looking at more advanced options.

  • great work~~

  • Coolness! Care to share your source code?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more