C3 platform emulation fan site
AndreL
Posts: 1,004
For those interested in emulation, game development, and related subjects. A customer that develops emulators is using the C3 as a standard platform for some new projects. Here is the site if you want to follow along or contribute:
http://www.c3emulation.com/
It just went live I think, so not much on there, but the developers have never programmed a C3 or the Prop, I sent him one a couple weeks ago, and after reading the HYDRA book, C3 docs, etc. he is already coding in ASM So, they are moving quickly. Should be interesting to see what they get up and running. They are SEGA fans, so that will be the first target.
Andre'
http://www.c3emulation.com/
It just went live I think, so not much on there, but the developers have never programmed a C3 or the Prop, I sent him one a couple weeks ago, and after reading the HYDRA book, C3 docs, etc. he is already coding in ASM So, they are moving quickly. Should be interesting to see what they get up and running. They are SEGA fans, so that will be the first target.
Andre'
Comments
It will be interesting to see what he comes up with on the C3!!
Paul
Because of the simplicity of this chip, It´s running at 175kHz and takes only 71 rows of assembly.
Btw, of course I'm interested in emulation on the C3!
/ Ahle2
Nice to see another Italian here.
Massimo
Welcome to this fabulous forum !!!
Good luck with your emulator. I'm really looking forward to follow the progress and try it out on my C3!!
(Btw, try out my chiptune player for the C3)
/Ahle2
Thank you Ahle2, I will try it for sure!!!! And if I wil use some "ideas" from your code I will include credits on the site. If you agree of course.
Hi Massimo! Yes, I'm from province of Turin Nice to meet you!
Hope this is going to spawn some interest in emulation as well as the C3.
Of course you can use or (misuse) anything I have done!!
Btw, you made me realize that I have got a bug in my SN76489 emulation.
/Ahle2
Thank you very much! My actual version of PSG is less optimized than yours, but actually I prefer to keep it simple since I started coding for Propeller some weeks ago.
Now I'm going to setup sd drivers, and have a try with your simple VGM player to have a test with what I've coded right now.
Then if everything works I will publish some sample code as a middle step.
Thank you very much!
Basically this is useful to give an idea on how this chip works.
later on I will go deep in developing the other channels
http://www.c3emulation.com
Hope you will enjoy it!
What's the next step? TMS9928A emulation?
I think TMS9928A emulation will need every trick in the book to be made to run in less than 3 cogs.
Anyway, I wish you good luck in your quest!
/Ahle2
Thank you.
Maybe there will be some bugs still to fix, but I prefer to optimize and fix more over the code when the emulation will start to get body.
The next step will be the memory access routines, SRAM and SD... Just surfing the wave of vgms, I will make them load from SD and put into SRAM. This will help me in figuring out hot to read a ROM game and buil up the memory map for the emulation.
But you are right, the VDP is very, very tricky... I can't remember how many times I optimized the VDP actionscript class of my emulators, and I know that in ASM will be really a challenge, Especially for the interrupt signal and the use of 16k of VRAM. However, let's do step by step
The VGM music was edited with MOD2PSG ( more info on the site, tools section ) to make it smaller and fit in the shared memory.
Have fun!
Francesco.
The VGM is loaded in the main memory of the Propeller. Not the correct solution but is fast enough for a test
In the C3 there are still 64Kb of SRAM to use and 1MB of flash... for my emulator I will load ROM files into SRAM that is really easy to program, even in ASM, and the advantage is that is really FAST! Anyway I think there are still some things to fix in the emulation, but as I mentioned I wil do in a second pass Actually it works enough to go on in the development
I've never seen a Propeler, I came from Arduino world, but in one month more or less, in spare time ( some night and some weekend ) I could learn a lot of things and put them into practice So... In my opinion C3 is really a great board, and it's worth it!
The TMS9928A will need some serious effort. But I do have a good feeling about this project, so I'm sure you will pull it off!
Hehe, you're right I've decided to start with this because I wanted to see some resuilts in a "short time" Now I'm motivated to go on
With my flash emulator I've started with VDP instead, and it was a real pain! It took me several months to optimize it, and it was written in a High level language. At a certain point I was depressed because it was slow, but... I tried to check other points of view. I've studied different solutions and I could make it faster. However This time is really different.
However thank you very much for your feeling Hope to make a good job.
OT: By the way, compliments for yours!!! I've seen many videos about your works SIDcog is amazing!
The main processor (HuC6280) took maybe 1/10 of the time to get "perfect" compared to the VDC; And the sound chip took maybe 1/20 of the time.
Sadly the PCe is a too complex machine to get working on the current generation Propeller chip, but I have successfully compiled and run the emulator on a 200 Mhz ARM processor with 16Mb of ram.
I am however certain that the Prop2 will be able to do it. (with some external memory attached of course)*
(Btw, have you tried the C3 version of my chiptune player yet?)
/Ahle2
When I've coded a color video driver for Arduino, I could take advantage from its interrupt, but it was really a pain because of the speed ( 16Mhz ) and the poor memory. The Propeller there's the VSU that can do really incredible things, and if i can fit the VDP Vram on the external SRAM, in some way I can think that it would be fine.
SC-3000 uses first 32/40K for ROM, and just 2k for RAM mapped at 0xC000. So amulating normal games that have no RAM onboard, I still have space for 16k of VRAM. C3 has 64K of SRAM
And if it would be a problem, at least I can put a little expansion board, and take some advantage from the I/O port, and add SEGA Joysticks plugs, Tape jacks, and an extra 32k of SRAM for the VDP Vram.
That would be enough
I've coded some assembly routines to handle SPI, SRAM and SD mounting/reading sectors.
I've decided also to start some graphics by studying the drivers included in the support package.
What I've used is the J_T_Cooks' graphic engine used in Spintris, but I've embedded some extra functions in the tile driver.
Right now it's enough, but of course to implement the TMS9928 much more works has to be done.
However hope you will enjoy this video, soon I will include sources in the site.
Enjoy!
Nice to see some progress on this. The GUI looks fabulous.
/Johannes
WOW, thank you for trusting me LOL :P Anyway thank you for appreciation, I'm going a little bit slow because I'm developing during spare time And of course this is subdivided between, family, house works, and so on.
I don't use the VSU to transfer bits, but, to be honest I haven't measured exactly the speed of my code, even because my final goal for SPI-SRAM is the access for Z80 to SRAM, so the transfer mode won't be sequential. Even between VDP and VRAM the access is not always sequential.
And the boot section, when a ROM will be copied from SD to SRAM doesn't need to be so much fast.
However I've tryied to measure cnt before the transfer and immediately after the unrolled 8 bit cycle and main SPI routines transferred 8 bit in 160 cycles ( I'm excluding the control word for setting mode and address )
But I don't think that this have a meaning, because the real speed will be influenced by many factor during emulation.
Actually the unrolled cycle of 8 bits takes 4 instructions to read or write each bit ( read and write are separated ) The code is reduced drastically...
each bit
So an average test will be done when Z80 will access directly to SRAM
Is there some code posted somewhere where we can try this out ourselves?
OBC
Can you post a package here that includes the GUI? Is it MIT licensed?