Commit Graph

27 Commits

Author SHA1 Message Date
AJR
32fbe35386 Check software parts for incompatibility as well as compatibility
This new softlist feature is now used by genesis_tmss to exclude several entries from megadriv.xml.

- Use popmessage instead of osd_printf_warning for incompatibility warnings
- Unify some common software loading code, which reduces indentation levels in clifront.cpp
2016-05-03 23:52:32 -04:00
Miodrag Milanovic
cfee536f22 Cleanups and version bump 2016-04-27 08:13:59 +02:00
Miodrag Milanovic
89c5e1f681 Various cleanups suggested by static analyzer (nw) 2016-04-24 12:58:31 +02:00
Miodrag Milanovic
1c726824f2 Split UI and frontend part from core [Miodrag Milanovic] 2016-04-23 11:26:47 +02:00
AJR
084d3654ca Iterate over devices C++11 style
Replace the old device_iterator and its specialized versions with functionally equivalent classes that use standard operators to yield references to devices/interfaces rather than pointers. With range-based for loops, they no longer have to be stored in named variables, though they can also be reused concurrently since the iteration state is now maintained by a subclass.

Add a few more typical getters to device_t::subdevice_list.
2016-04-18 18:53:28 -04:00
etabeta78
c1600cafd9 diimage.cpp: Allow image devices to be configured with a fixed
(not user selectable) piece of software and updated a few options
and menu to acknowledge such possibility. [Fabio Priuli]

macs.cpp: Converted to use generic cartslot with fixed software
configuration. Cleaned up loading and banking systems in the driver
as a result. [Fabio Priuli]
2016-04-12 14:37:22 +02:00
dankan1890
5fe4b275dc Fixed MT06173: Software loaded outside of software list (e.g. -cart PATH_TO_ROM) fails to save SRAM. 2016-04-04 00:39:03 +02:00
AJR
a7e393b36b Iterate over core classes C++11 style
C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.)

device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config.

memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
2016-03-31 09:43:53 -04:00
Vas Crabb
100fa28671 * Remove confusing method from vectorstreams that hide base_ios method (fixes disassembly view)
* Allow std::string to pass through core_file unmolested (reduces temporary allocations)
* Make zip/7z instances of same class with uniform interface
* zippath browsing is broken at the moment

This is another step towards transparent archive support.  It's now
possible to access zip and 7z archives with the same code.  Nothing is
taking advantage of it yet.  There's now some very similar code in
fileio.cpp and clifront.cpp that could be folded at some point.
2016-03-18 19:32:10 +11:00
Vas Crabb
42fbb9c396 Make osd_file a polymorphic class that's held with smart pointers
Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures
Make zip_file and _7z_file classes rather than having free functions everywhere
Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache
Don't dump as much crap in global namespace
Add solaris PTY implementation
Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax
Rearrange stuff so the same things are in file module for all OSDs
Move file stuff into its own module

7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access
Directory functions still need to be moved to file module
SDL OSD may not initialise WinSock on Windows
2016-03-14 18:55:00 +11:00
Vas Crabb
73b44c9429 Turn core_file into a proper class that gets cleaned up safely using unique_ptr
Subverted somewhat by chd_file class
2016-03-06 21:49:56 +11:00
Vas Crabb
aec01e7407 Replace strformat, strprintf and strcatprintf with type-safe steam_format and string_format
Update MAME to use new function
Instantiate ODR-used static constant members
Make some of the UI code more localisable
Remove use of retired functions in tools
2016-02-28 13:36:19 +11:00
dankan1890
16d9f27d06 Some missed in menu conversion. 2016-01-31 00:00:43 +01:00
dankan1890
361d32d37f Small code cleanup:
- corealloc.h: added macro definition for global_alloc (nothrow) memory allocation.
- textbuf.cpp / wavwrite.cpp: removed pointless cast.
- debugcmd.cpp / luaengine.cpp / render.cpp: avoid strlen calls in a loop.
- diimage.cpp: simplified "device_image_interface::set_image_filename" function.
- miscmenu.cpp / selgame.h / video.cpp(h): replaced int with bool where applicable.
- ui.cpp: removed unused code.
2016-01-29 00:43:18 +01:00
Miodrag Milanovic
b1d6f6d63f Cleanups and version bump 2016-01-27 08:12:00 +01:00
therealmogminer@gmail.com
2820f1c277 Time for more this==NULL fixes 2016-01-23 17:30:14 +01:00
mooglyguy
821c7e0b2b Still more this==NULL cleanup 2016-01-23 17:30:14 +01:00
Miodrag Milanovic
4e8e3066f8 reverting:
SHA-1: 1f90ceab07

* tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-20 21:42:13 +01:00
Miodrag Milanovic
1f90ceab07 tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-16 14:54:42 +01:00
Miodrag Milanovic
43cc0ac675 final touch on romload modernization (nw) 2016-01-11 21:27:11 +01:00
Miodrag Milanovic
f0dc809ab8 image_manager modernized and move some things around (nw) 2016-01-11 14:59:24 +01:00
AJR
115db95642 Return std::string objects by value rather than pass by reference
- strprintf is unaltered, but strformat now takes one fewer argument
- state_string_export still fills a buffer, but has been made const
- get_default_card_software now takes no arguments but returns a string
2016-01-10 16:36:18 -05:00
Miodrag Milanovic
ce75a5d682 removed memory tracking (nw) 2016-01-08 12:41:13 +01:00
Miodrag Milanovic
91605d3f4d clang-modernize part 1 (nw) 2015-12-03 18:17:25 +01:00
Miodrag Milanovic
0825ce4f3b Cleanups and version bump 2015-11-25 08:22:24 +01:00
Miodrag Milanovic
d1dc775f9b Some cleanups and init fixes with help of ReSharper C++ (nw) 2015-11-11 16:31:18 +01:00
Miodrag Milanovic
7c19aac60e Rename *.c -> *.cpp in our source (nw) 2015-11-08 12:56:12 +01:00