Programming the SRAM from the PC using papilio-prog

Recommended Posts

Hi all,

trying to get my Sega Master System not dependant on external storage, I wanted to upload the game roms through USB into the SRAM chip.

I first devised an AVR8 script that read mem files over UART. Horribly slow. Then I made a custom, VHDL UART core to do the same thing. Better, but still very slow (unstable at high UART speeds): 2Mbits of binary data is ~8Mbits of mem ascii data, that's over a minute @ 115200 bauds...

So I decided to use the JTAG interface, modifying papilio-prog 8)

It works just as SPI Flash programming, except you should use -B and -S (rather than -b and -s). You'll also want to set "-S p", as verify is not implemented yet. That gives:

papilio-prog -S p -B bscan_sram.bit -f [your binary file]

The file is read as a sequence of 16bit words, that are put at address 0, 1, 2, etc.

The whole chip is programmed  in a few seconds.

You can get the forked version of Papilio-Loader, with the new vhd/bit files and the modified C++ code on github :

I'd be glad to have your feedback on this.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now