MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

lharms
MAME Fan
Reged: 01/07/06
Posts: 908
Send PM
Re: C versus C++ with regard to MAME
07/06/11 04:03 AM


> > So the MameDevs changed Mame to implement code from others' work (the hard part of
> > the project) rather than create the code from scratch.
>
> Wow. That is so not the takeaway I was trying to convey. Bryan got it - read his
> reply and you might start to understand.
>
> Caveman version for people with no significant life experience as professional
> programmers: MAME easier to read, to write, to bugfix, and to share with other
> emulators. All of those are good things, not just one. Zug zug.

Well said. The project should have been C++ a long time ago. This was starting to show its ugly head way back in the .3x era. Wholesale copying of code between drivers and cpu cores. Where the only difference between the two sets of code was some small revision in some call. Like a cpu instruction missing in one core but not another but a game relying on the behavior of the missing instruction. So many things ended up with switchs and jump tables. For something that would be a simple derivation in C++. It got better with sharing. But I still see blog posts where 'merged code and used newer implementation xyz number of bugs fixed'. That is just one symptom of the problem of sticking to C dogmatically. Another one was having to retrofit savestates into all of the drivers. Where it could in theory be inherited into everything.

I have had a couple of projects where I was constrained to C only. After awhile it is 'if only I had C++ this is would be much easier to do'. Its not then you write 30-60 lines for something C++ does naturally.

Also it is C++ and does everything C does... So you can in theory still do it the 'C way'. But why do it? Why limit yourself?

If done properly you could even see how different devices/boards/etc were 'born' from other ones and provide better documentation.







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 479 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