Maybe, it will be better to split thread to discussion about MDP and discussion about SMD emulation on handheld devices?
Stef wrote:Did you tried Genesis Plus on your 400 Mhz PDA ? It is pure C but the code is good :)
I tried it today, and that works surprisingly well. Not ideal, of course (as I understand, author did not optimize code for PPC) - with noticeable but acceptable frameskip, and with good sound, at least. Unfortunately, this emulator not shows FPS, and I was not able to edit config file at device while test, so I can't do some benchmarks. I only can say that v1.3 allow to choose between different Z80 and M68K cores, and MAME M68K core is much slower (games becomes unplayable), and change of Z80 core does not make noticeable difference.
Eke wrote:Charles Mc Donald has made a really awesome work with this emulator and even if it's coded in pure C, the rendering code, for example, is damn fast,with use of lot of precalculated lookup tables and coding tricks
I believe that, but I must notice that lookup tables can slowdown code, which works very fast on x86 PC's, on systems like PocketPC - these tables just does not fit in smaller cache (sometimes real computations works faster than precalculated tables on systems with slow memory).
Eke wrote:The only downsides might come from the 68k & YM2612 (and maybe Z80) 'C' cores, which came from MAME, are not really optimized and would perhaps slowdown the emulation on some platform, I don't know...
As I said in this post, they very slowdown emulation. And I can say, sometimes these cores not 'not really optimized', but 'really not optimized'. That not bad, of course, because these cores designed not to work fast, but to work very precisely.
Eke wrote:but on the Gamecube (~500Mhz PowerPC CPU), I have every genesis games running at full speed
I think, Gamecube does not have slow memory, like portable devices has, and also have bigger cache.
Eke wrote:PS: does someone know about the Radica ? according to devster (
http://devster.monkeeh.com/sega/radica/) it's something like Genesis on a single Chip ... I really wonder how they did this, is this some kind of multiple chips "emulation" on a FPGA ?
I don't know about Radica (never seen), but all SMD clones in my country from early 2000s is built on two or single big chips. And all NES clones here from mid of 1990s is one-chip - only in early 1990s there sometimes was multi-chip clones, with external memory in DIP cases, or complete with many discrete DIP chips (including CPU and PPU).
Chilly Willy wrote:The problem with using C/C++ vs assembly is register usage. For best speed, you need to keep certain things in registers as much as possible as the memory is SLOW (as you mentioned yourself). With C/C++ emulators, the emulated stated is always in memory. Because of this, I've yet to see a C/C++ emulator even reach half the speed of an emulator done in assembly, despite optimizing compilers. When you choose what to keep in registers correctly, even poor assembly is VASTLY superior to the best C code for emulations.
I don't say that you point is wrong, I just explain my point. If we have slow memory, to make code faster, we generally must minimize access to memory. Storage of most usable variables in registers is just an particular case of that. But we can't fit all needed variables in registers anyway, and there is other methods exists. We have cache, we can temporarily move global variables to register variables, until loop execution, etc. And when we minimize memory access in C code, we get same bottleneck as in equal assembly code - for loops it's usually reading of input data stream from slow memory.
Stef wrote:Gens2.14Souvenir clone few "ASM" to "C" converting feautures, and with the Reality sound.
(the SEGA VDP's real the Triangultic rectangular wave's. but 76496 are Rectangular wave's. not compatibles.)
triangle wave ?!!
There is written
triangultic rectangular, not just triangle. This can mean something like you draw - rectangular wave smoothed with output filter.