Sega Master System on a STM32 Development Board

Sega on STM32

Some hackers have managed to convert an STM32 development into a Sega Master System emulator. This means Sonic the Hedgehog running on an ARM Cortex-M4.

This hack has a number of parts. First, [Alessandro Rocchegiani] showed off a video of his Sega Master System emulator running on the STM32F429 Discovery development board. This first version used the on board 2.4″ TFT LCD screen.

[Fabrice] was working with this STM32 Discovery board already. He had developed an expansion board that added a number of features to the development kit, including an R-2R DAC for video output. When [Fabrice] found out about the Sega Master System emulator, he worked with [Alessandro] and his son [Fabrizio] to get VGA output working. They also added support for the Wii controller using [Fabrice]‘s Wii library. The result is a Sega Master System emulator with VGA output at 640 x 480, with 16 bit color and Wii controller support.

You can watch a video of both the LCD and VGA versions of the hack after the break.


  1. John says:

    Cool project, but nobody is THAT bad at Sonic…

  2. I have to agree , I’m a bad player :)
    And when i was doing the video i don’t really have take care on what happened on the screen , but if so , i will just survive some more seconds …


  3. Davidtle says:

    One of the best project.
    Please add instruction to compile the lastest version.
    I had error in KEIL with the directive #include “—-” Please help I;m new in STM32
    Many Thanks

  4. krisanks says:

    what no blast processing.

  5. mark g says:

    The Mega Drive, not the Master System, was the 16-bit console.

    • ChalkBored says:

      The 16 bit color reference seems to be referring to the video DAC on the expansion board.

      The Master System only had a palette of 64 colors and would normally only display half of those at once, so it’s kind of wasted at the moment.

  6. Yann says:

    @mark g : read correctly…

    great work !!!!

  7. Bogdan Marinescu says:

    …and this is how you redefine “awesome”. Thanks, made my day.

  8. wretch says:

    It never ceases to amaze me what some people can cram into so few bytes. (c:

    • makapuf says:

      This board has 8Mbytes of RAM … (just in time for when I was about to publish a Gameboy emulator on the stm32f405 with 192k ram !)

      • Fabrice says:

        For the Original version from Alessandro , only internal Flash and SRAM is used.
        the SDRAM is the ‘standard’ frame buffer , then a very little part from the 8Mb is in use ;)
        For my board it actually have 24Mb and the difference with Alessandro version is that
        i don’t put the Game ROMs into the Flash but i read them from SD Card and put the whole into SDRAM buffer.
        And here again , we are far away from the 8Mb we can use ;)

    • Alessandro says:

      The LCD version this is in the first beta release. It need some clean up, so I think will fit in about 20K in the future version :)
      All my released Open Source can be fit in less than 32K so everyone can try it.

  9. Galane says:

    How about doing something with the STM32F3 Discovery board?

    • Fabrice says:

      The 32f3 don’t have the dma2d and ltdc like the st429.
      It can probably done with one of the ‘normal’ DMA but then it will happens what i get
      with my st407 board , allot of glitch on screen due to bus contention and another noise
      in picture when the CPU is computing allot stuff together.
      You can look how ugly it become here : at 2min23sec

      Now , for made emulator , VGA , etc … the best match at low cost was the st429 disco board.

  10. Heh, I was going to say it’s the Genesis, not the SMS… But it turns out that they released a ‘low def’ 8-bit Sonic game for the Master system the same year as the original. (And then later ported it directly to the Game Gear.) I had no idea.

  11. guy fortabat says:

    I am programming the STM32F429 with Forth language.
    As far as I can see in your very beautyfull port of Sage Master, I have one question:

    I have turn and turned again STM documentation to find the memory mapped display adresses. Any idea from where I can fetch these informations. I only need text on screen for the moment.

    Thanks for your help,

    Guy from Paris

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,534 other followers