[Coco] What would a CoCo successor have to have as a minimum?

Roger Merchberger zmerch-coco at 30below.com
Sat Nov 20 01:16:51 EST 2010


On 11/19/2010 07:39 PM, Aaron Wolfe wrote:
> On Fri, Nov 19, 2010 at 6:51 PM, Roger Merchberger
> <zmerch-coco at 30below.com>  wrote:
>
>> Yes, the PC emulator could go much faster than the hardware, but as long as
>> code created in the emulator ran in on the "upgraded" FPGA hardware that
>> would be awesome.
>>
>
> I'm not sure where the idea that FPGA is slower than a PC came from,
> but it's simply not true.

Well, it could be depending on the efficiency of the emulator... I 
remember running Jeff Vavasour's CoCo3 emulator on a Pentium2-350 (well, 
it was a dual-CPU system, but JV's emulator would only use one CPU) and 
basic benchmarks (more extensive than your example, but certainly not 
exhaustive) put it 4-5x faster than my stock CoCo3.

The last time I ran an emulator was on my 933Mhz Transmeta Crusoe-based 
Fujitsu Lifebook P2120, it was an earlier version of MESS and I was 
doing some programming work in Portal-9 on WinXP; and it _seemed_ at 
least that fast, but I really didn't do any benchmarks and running an 
emulator in an OS that didn't deal well with the hardware-emulated x86 I 
really didn't think it could have been a "fair comparison" to actual x86 
hardware.

I can say that MESS under MerchOS (OK, it was Linux, but it was Linux 
 From Scratch that took over a month to build and was optimized for the 
Crusoe) was *much* faster. A standard WinXP or Linux install benchmarked 
similarly to a P3-600 or P3-650, my LFS build benchmarked just over a 
P3-1.3GHz. A lot of 16/32bit ROMs that would barely (if at all) run 
under MESS in WinXP and stock Linux ran beautifully under MerchOS.

[[ As an offtopic secondary datapoint: DVDs just refused to play on 
WinXP (I tried almost 10 different apps for it); stock Linux distros 
would "play" but with glitchy audio & at least 50% dropped frames -- 
DVDs on MerchOS would play beautifully and rarely push the CPU beyond 
40% utilization. ]]

I was assuming (yea, I know the consequences) that the emulator 
everyone's been talking about wasn't MESS but was a finely tuned 
emulator similar to JV's...

> Here is a comparison between MESS and VCC on my (fairly) modern
> 2.66Ghz Intel Core 2 Quad Q6700 PC and the Altera DE1 running a simple
> BASIC program.  I'm sure there are better ways to do benchmarking, but
> I just wanted to show a simple point.
>
> 10 x=0
> 20 x=x+1
> 30 if x<  20000 goto 20
> 40 print "done"
>
> MESS with throttle off takes 11.5 seconds
> VCC with "overclock" all the way to the right, "89,4Mhz" takes 5.5 seconds
> The Altera DE1 at 25Mhz takes 7.9 seconds

Well, it seems Vcc isn't happy in Wine under Linux (it might just be a 
'directory mapping issue' as it might not be able to find the ROMS in 
that environment... I didn't really investigate), so I thought for 
giggles I'd load it under my XP install under VirtualBox. Although my 
system's quite a bit older than yours, I wouldn't call it a slouch just 
yet. ;-) 2.2Ghz dual-core AMD Athlon64 (one of the oldies...) 2G of DDR 
DRAM (the Mobo's max, the machine was built just as DDR2 was emerging).

Also, I didn't have (easy) access to a stopwatch, so I just went by my 
system clock (which does display seconds) and I set the VirtualBox 
window just below it so I could "glance" and try to get the seconds, 
didn't try for sub-second accuracy...

It appears that Vcc *has* to have the 'poke 65497,0' command to go into 
full "overclocking" mode, and with the poke enabled and the 
'overclocking' maxed, and started the program as soon as the seconds 
rolled '00' on my system. After several runs, the program took "around 6 
seconds" - a few times I would glance up I could *just* see the second 
roll over from 5->6, others it had *just* rolled to the 6, but sat there 
for nearly a second before it'd roll to a 7. I went under the config & 
changed the frameskip from 1 to 6, and tried the test again, and it took 
just under 5 seconds. (Every time I ran it, when I saw 'done' I'd see 
the 4 roll over to a 5.) Oh, and I set the CPU to 6809 also; I don't 
have anything 6309 based (yet) so it's just "force of habit" I guess. ;-)

VirtualBox is version 3.2.10 r66523, the virtual machine has 768M, one 
CPU, 2D accelleration is enabled, 3D is disabled...

As this is an emulated computer running on an emulated computer running 
on a 5+ year-old machine, it's possible that the CPU's abilities aren't 
the limiting factor for the emulation environment... I'm not sure. I've 
already assumed once this thread & got burned for it, I don't wanna do 
it again... ;-)

It's really got my curiosity piqued now... I really want to make a small 
DOS boot partition on my HD and get JV's emulator again; see how (if?) 
well that runs on a newish system... At least as a test, maybe a small 
DOS VM... Hrm... Time to dig/find some MSDOS disk images; or maybe test 
out the latest FreeDOS...

> As you can see, even compared to a fairly powerful, modern PC, the DE1
> (a low end FPGA board) is keeping pace just fine.
> If you want the emulator based CoCo 4 to run on older or cheaper PCs,
> at least for now, it would be the emulated platform that would be the
> limiting element, not the FPGA platform.

I suppose it depends on how you define "older" -- if you mean 5-6 years 
old, I would now say that it would be "rougly equal" anyway, as just 
about anything with 2.2GHz+ seems to keep up OK, older than that, I'd 
agree... but even then - if some people have to "put up" ;-) with an 
emulated 15MHz CoCo with full VGA and a much bigger memory footprint for 
cheap, I should hope they'd be OK with it... ;-)

It would also be interesting to see if the "new CoCo4 emulator" could 
make use of multiple cores, even if it was simply "one core emulates the 
6809, one core handles the video manipulation, one core handles the 
audio & IO, and one for housekeeping... most of the cores might be kinda 
bored, but it could still see a speed bump... who's to say? ;-)

> Also, I'm surprised by how much faster VCC is in this test than MESS
> is.  In actual use, I've not noticed much difference.  Could be this
> test isn't very good :)  I just wanted to try and put things in
> perspective.

I'm not surprised, and this comment isn't intended to 'dis' the MESS 
team as they do a fantastic job with a fantastic system, but the 
directions the two programs take are nearly polar opposites. Vcc seems 
to be "Emulate one computer, that's our focus, make it as compatible & 
stable to the original hardware as possible..." MESS seems to be 
"Emulate everything we can, do it as well as we can, make sure it plays 
the maximum amount of games we can." Having a code base that allows all 
the different CPUs, memory maps, video & audio hardware permutations, 
etc. has got to set one's mind reeling on how it gets accomplished; but 
to accomplish what they have probably means some compromises when it 
comes to max emulation speed.

Well, yet another long winded email... if I keep this up the electrons 
that deliver my mail for me are gonna start getting miffed... ;-)

Laterz!
Roger "Merch" Merchberger



More information about the Coco mailing list