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.

19 thoughts on “Sega Master System On A STM32 Development Board

  1. 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

    1. 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.

      1. 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 ;)

    1. 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.

    1. 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
      https://www.youtube.com/watch?v=xs_Puw_lOWg
      Now , for made emulator , VGA , etc … the best match at low cost was the st429 disco board.

  2. 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.

  3. Hi,
    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

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.