Genesis Plus DC / 68k Core News

Stef has posted some very interesting developments in the DCEmu UK Forums , heres the post:

Well, i’ve some news about C68K (a new 68k core i wrote in C, designed for speed) :

I finally implemented all opcodes, but there are still many bugs to fix
I first tested it on a PC Genesis Plus version… i implemented “on-the-fly” core switch and it worked well, i succefully played with Sonic 1, Sonic 2, Sonic 3, Aladdin … i had to switch to musashi sometimes because of multiples bugs in C68K.

Nice, it (almost) works on PC, what about the DC ?
So i implemented C68K in Genesis Plus DC, but just with inlines methods using musashi or C68K depending a #define (understand by that : no “on-the-fly” core switch as PC version)…. then it failed
even with -O0 optimisation

So i did a new PC build with inlines methods instead of the complete multi core support and i got the same result on PC version… weird, i finally discovered that sonic1 (my favorite test rom) didn’t work with that implementation hopefully Aladdin did work

-> testing DC version with aladdin (arg 1.2 MB to upload instead of 350 KB for each test)…
IT WORK ! at least with optimisation set to O0, and believe me, with O0, Genesis Plus DC doesn’t run very fast (about 11-12 FPS)…

After severals tests, i discovered that -O1 optimisation level just break C68K
but -Os does work
unfortunatly, C68K wasn’t designed for -Os optimisation, and i think it perform better with -O2 than -Os but at least i can get it to work with optimisation…

I don’ really benched C68K versus musashi on DC, but i will do it that tonight and report result here…

For those who want to include C68K in their project just for testing purpose (remember the core is still in development), i can give a pre-compiled obj file (-Os optimisation level) with .h file and an interface which permit to use musashi or C68K depending CPU68K_USE_MUSASHI or CPU68K_USE_C68K definition… some stuff as memories handlers and interrupt callback need to be modified also, the current C68K interrupt callback is wrong, i’ll redo it later as musashi one.

Great Stuff, check out the topic Here