搜索
bottom↓
回复: 20

世嘉 SEGA 模拟器 for STM32F429

[复制链接]

出0入0汤圆

发表于 2014-10-26 20:33:00 | 显示全部楼层 |阅读模式
本帖最后由 mobile02 于 2014-10-26 20:35 编辑

可惜没有声音

On this page you will get the Source code for emulate a Sega Master System with my VGA expansion board.
The original work for the st429 Discovery board is from Alessandro Rocchegiani.
You can watch his video here :
STM32F429 Discovery Sega Master System Emulator

I want to thank Alessandro and his Son Fabrizio for all the help they provided for adapt this emulator on my library.
You will see the result here :
stm32f429 discovery board running Sega Master System Emulator in VGA screen
A big update to the Emulator today the : 2014 02 09:
First of all i finally found what have made the Emulator 2 x slower than the normal speed.
It was the Wii controller driver.
Because I2C need some delay between send/receive , at each screen we loose allot of time.
So i decided to remove the Wii from here and use now the TM1638 driver , SPI is so fast that you
don't see any breaking when you are playing.
Only bad thing is that i don't have joystick that work with SPI actually :)
Alessandro use buttons connected to free pins from the disco board , and i use the Spectrum
keyboard i just made for the other emulator to play with the SMS games , not really effective
but good for intensive testing.
Alessandro helped allot here for the use of the 4 x SMS screen resolution , don't forget that we
use 640 x 480 pixels here and it take lot's of time.
And now everything run smooth , i see that some games like R-Type have sometimes graphical bugs.
But for a beta version we have to agree that it run well :)

Now more information about the key used from the Spectrum keyboard.

At the starting menu you can choose the game you want run.
the key's are :
Up = 1
Down = Q
Select = Enter

In-game key to use :
UP = S
DOWN = Z
LEFT = Caps Shift
RIGHT = X
FIRE 1 = Symbol Shift
FIRE 2 = Break Space

For select another game use :
RESET

This will stop the actual game , open the Selector Menu , and let you choose the next game to play.

Now for use other SMS ROM Images don't forget to modify :

#define NUM_CARTRIDGE 6                   <-- you need to put the exact number of Game ROM you put on the SD Card

Next is just to edit this variable ,
the 1st value (0x0F for example) is the number of 16k bank that the ROM contain.
0x00 (0) to 0x0F(15) = 16 (0 is included !!)
Then for the 0x0F Value the ROM is a 16 x 16k = 256k ROM
the next value :
"Sonic the Hedgehog '91" is what you will see on the Selector menu
Then come the :
"0:/sms/Sonic.sms" it's where you have put the ROM into the SD Card
Don't forget that we use the 8.3 format (8 Character for name and 3 Character for extension)

// Place the ROM into SDRAM 2 after the Display buffers
ROMS Cartridge[NUM_CARTRIDGE]={
    //     0123456789012345678901
    {0x0f,"Sonic the Hedgehog '91","0:/sms/Sonic.sms"},
    {0x0f,"Castle of Illusion '90","0:/sms/Castle.sms"},
    {0x0f,"    Psycho Fox '89    ","0:/sms/Psycho.sms"},
    {0x1f,"  The Lion King  '94  ","0:/sms/Lion.sms"},
    {0x1f,"        R-Type        ","0:/sms/RType.sms"},
    {0x1f," D. Duck in Hollywood ","0:/sms/Daffy.sms"}
};

You have just to recompile and play your games ;)

News from 2014-02-25:
I improved the way i read the SDCard , before it was bytes per bytes , now i use a fixed address to SDRAM for not have to specify them in the Load function and
the File are read with 512 bytes block , it have improve the stability on reading and i doesn't get any read error up to now.

At bottom from the page , the latest source code.

Download
http://www.openedv.com/posts/downloadAttach/7889.htm

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

阿莫论坛20周年了!感谢大家的支持与爱护!!

一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。

出0入0汤圆

发表于 2014-10-26 21:02:27 | 显示全部楼层
有点意思

出0入0汤圆

发表于 2014-10-26 21:52:25 | 显示全部楼层
好东西!!!!

出0入0汤圆

发表于 2014-10-26 22:46:01 | 显示全部楼层
好资料。

出0入0汤圆

发表于 2014-10-26 23:07:45 | 显示全部楼层
好东西            

出0入0汤圆

发表于 2014-10-27 06:56:04 | 显示全部楼层
不错,不过还没有F4的板子,等机会。

出0入0汤圆

 楼主| 发表于 2014-10-27 07:10:43 | 显示全部楼层
bjdfdh271006 发表于 2014-10-27 06:56
不错,不过还没有F4的板子,等机会。

等原子的M4板子上市试试看,听说要 1M 以上的 RAM 才跑的动.

出0入0汤圆

发表于 2014-10-27 07:14:20 | 显示全部楼层
怀念啊!

出0入0汤圆

发表于 2014-10-27 08:06:35 来自手机 | 显示全部楼层
不错哦,

出0入0汤圆

发表于 2014-10-27 08:28:57 | 显示全部楼层
看样子挺牛叉的

出0入0汤圆

发表于 2014-10-27 08:29:49 | 显示全部楼层
这个牛啊……用429做个小掌机玩不错

出0入0汤圆

发表于 2014-10-27 08:41:29 | 显示全部楼层
这个有意思,小霸王其乐无穷啊!

出0入0汤圆

 楼主| 发表于 2014-10-27 19:41:02 | 显示全部楼层
希望有人有能力转移给 STM32F407 使用.

出0入0汤圆

发表于 2014-10-27 19:48:20 | 显示全部楼层
有意思!!

出0入8汤圆

发表于 2014-10-27 20:04:35 | 显示全部楼层
这个游戏机是我的最爱。。。一直想做个可烧写的卡没资料。

出0入90汤圆

发表于 2014-10-27 20:11:40 | 显示全部楼层
这个我玩了的!在429板子上面。它里面的模拟器CPU部分是汇编写的。这部分429和407如果兼容的话,估计还能移植,否则的话就不行的

出0入0汤圆

发表于 2014-10-27 20:14:34 | 显示全部楼层
有机会移植玩一下

出0入0汤圆

发表于 2014-10-27 20:30:55 | 显示全部楼层
牛人。。。。

出0入0汤圆

 楼主| 发表于 2014-11-2 10:48:34 | 显示全部楼层
汇编如果不大,是否能转C来分析?
APU 是否有办法提供?

出0入0汤圆

发表于 2014-11-2 16:43:25 | 显示全部楼层
好东西!!!!

出0入0汤圆

发表于 2019-1-3 00:29:26 | 显示全部楼层
怎么打不开了?能否重新传下
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-24 16:22

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表