MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM
Re: C versus C++ with regard to MAME
07/05/11 06:07 PM


> So let me get this straight. The Mamedevs changed the core of MAME from C to C++ just
> to make it easier to read?

And also to make it easier to write, maintain, and share. Subclassing a device was a few dozen lines of switch statements with impenetrable macros before, and there were arcane rules where a CPU couldn't also do audio I/O, even though many games use DSPs that do just that. Now it's simpler, cleaner, more flexible, and everything works exactly like your CS professor (hopefully) taught you.

People complain that (for instance) working on driver A can instigate core tampering that hurts driver B. That's no longer possible - the core protect: and private:s its implementation details now, so the compiler won't let you touch them.

> Your (unreferenced) benchmarks says that the core speed was the same.....

Go to John IV's benchmarks page. The relevant one is 0.128 vs 0.128u4. (The ST-V result there was because of a bug that's since been fixed; everything else is in the statistical noise).

> Why waste all that time and effort to fix something that wasn't broke? Just to make
> it easier on the eye?

Let me put this in a way even the "but it doesn't improve the emulation" crowd can understand: the C++ conversion made it immediately possible to bring in classes from pSX, which greatly improved PSX emulation on both the MAME and MESS sides. Similarly we've brought in pieces of bsnes and improved both MAME and MESS (one of the NEC DSPs was also used in arcade games). And I have the (C++) source for ElSemi's Model 2 emulator. Guess what will happen to the quality of MAME's emulation when I drop that in?







Entire thread
Subject Posted by Posted on
* C versus C++ with regard to MAME mogli 07/04/11 07:09 PM
. * Re: C versus C++ with regard to MAME byuu  07/06/11 12:14 AM
. * Re: C versus C++ with regard to MAME AeroCityMayor  07/05/11 05:44 PM
. * Re: C versus C++ with regard to MAME mogli  07/06/11 06:56 AM
. * Re: C versus C++ with regard to MAME R. Belmont  07/05/11 06:05 AM
. * Re: C versus C++ with regard to MAME byuu  07/06/11 12:20 AM
. * Re: C versus C++ with regard to MAME Bryan Ischo  07/06/11 06:52 AM
. * Re: C versus C++ with regard to MAME italieAdministrator  07/06/11 02:43 AM
. * Re: C versus C++ with regard to MAME italieAdministrator  07/04/11 11:57 PM
. * Re: C versus C++ with regard to MAME Anonymous  07/04/11 10:54 PM
. * Re: C versus C++ with regard to MAME TafoidAdministrator  07/04/11 11:09 PM
. * Re: C versus C++ with regard to MAME Anonymous  07/05/11 10:17 AM
. * Re: C versus C++ with regard to MAME BIOS-D  07/05/11 12:26 PM
. * Re: C versus C++ with regard to MAME Anonymous  07/05/11 03:25 PM
. * Re: C versus C++ with regard to MAME Olivier Galibert  07/05/11 10:27 AM
. * Re: C versus C++ with regard to MAME Anonymous  07/05/11 11:52 AM
. * Re: C versus C++ with regard to MAME R. Belmont  07/05/11 02:29 PM
. * Re: C versus C++ with regard to MAME Anonymous  07/05/11 03:42 PM
. * Re: C versus C++ with regard to MAME Heihachi_73  07/06/11 04:44 AM
. * Re: C versus C++ with regard to MAME R. Belmont  07/05/11 04:13 PM
. * Re: C versus C++ with regard to MAME Anonymous  07/05/11 04:39 PM
. * Re: C versus C++ with regard to MAME R. Belmont  07/05/11 04:45 PM
. * Re: C versus C++ with regard to MAME TheGuru  07/05/11 11:25 PM
. * Re: C versus C++ with regard to MAME Anonymous  07/05/11 05:39 PM
. * Re: C versus C++ with regard to MAME zambr  07/06/11 06:12 AM
. * Re: C versus C++ with regard to MAME R. Belmont  07/05/11 06:07 PM
. * Re: C versus C++ with regard to MAME byuu  07/06/11 01:00 AM
. * Re: C versus C++ with regard to MAME Bryan Ischo  07/06/11 01:36 AM
. * Re: C versus C++ with regard to MAME Bryan Ischo  07/05/11 06:51 PM
. * Re: C versus C++ with regard to MAME Olivier Galibert  07/05/11 06:03 PM
. * Re: C versus C++ with regard to MAME Anonymous  07/05/11 07:18 PM
. * Re: C versus C++ with regard to MAME Olivier Galibert  07/06/11 08:38 AM
. * Re: C versus C++ with regard to MAME R. Belmont  07/05/11 07:34 PM
. * Re: C versus C++ with regard to MAME lharms  07/06/11 04:03 AM
. * Re: C versus C++ with regard to MAME CrapBoardSoftware  07/04/11 10:16 PM
. * Re: C versus C++ with regard to MAME Roman  07/04/11 11:02 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 233 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3745