Commit Graph

125 Commits

Author SHA1 Message Date
Miodrag Milanovic
2edee0b811 updated astring constructors to have just one string param, to be more like std::string (nw) 2015-04-13 12:25:21 +02:00
Miodrag Milanovic
7faba31b1b There is no implicit conversion to char* in std::string (nw) 2015-04-12 08:05:43 +02:00
Miodrag Milanovic
6b36c7ab22 cstr() - > c_str() as preparation for move to std::string (nw) 2015-04-11 15:26:58 +02:00
Justin Kerk
519be73d61 Remove duplicate and unused code (compare src/lib/util/cstrpool.c) (nw) 2015-01-31 12:40:43 -08:00
Miodrag Milanovic
cb5b67e482 Move expat.h include to c file (nw) 2015-01-11 17:07:19 +01:00
Oliver Stöneberg
25a704af39 actually report softwarelist XML parsing errors in -validate (nw) 2014-11-26 09:19:10 +01:00
Oliver Stöneberg
98aedadd72 fixed poteotential -validate crash with invalid softwarelist XML (nw) 2014-11-26 09:02:27 +01:00
Fabio Priuli
474ff69935 (MESS) nes.xml: added a couple of new multigame dumps using
OneBus PCB. [TeamEurope]
2014-10-13 05:58:14 +00:00
Miodrag Milanovic
5d7e1fcc62 Cleanups and version bump 2014-07-22 06:14:55 +00:00
Alex W. Jackson
98eac17316 Add width and endianness attributes to data areas in software lists (nw)
Update neogeo.xml to take advantage of them.

For regular rom loading we try to autodetect the appropriate endianness and
width by matching the region tag to a device with a device_memory_interface;
this is generally not doable for software lists because the regions are
children of some slot device and thus not siblings of the devices in the root
driver (i.e. "cartslot1:maincpu" rather than "maincpu") So you have to
specify the width and endianness manually for now.

Anyone who has spare time, feel welcome to byteswap every single entry
in megadriv.xml and update them to use this :-)
2014-07-01 07:55:38 +00:00
Miodrag Milanovic
67663501d7 Moved eminline and related files into /src/osd since it's system related (nw)
Moved delegates into /src/lib/util to enable usage of delegates in other project parts

Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* 

Changed mess.mak to display compilation of ymmu100.ppm nicely
2014-04-16 08:04:20 +00:00
Oliver Stöneberg
c2ea61475b optimized software_list_device::find() a bit - speeds up -validate for MESS (nw) 2014-04-07 09:46:36 +00:00
Miodrag Milanovic
fec65e0b57 Cleanups and version bump 2014-04-07 06:04:18 +00:00
Oliver Stöneberg
2e5ea37f65 removed mame_* aliases and just use core_* functions (nw) 2014-03-24 22:05:08 +00:00
Miodrag Milanovic
05bd0eb8ea fixed softlist loading (nw) 2014-03-12 08:54:56 +00:00
Oliver Stöneberg
d965157fcc more clang and Linux compilation fixes (nw) 2014-03-11 17:27:39 +00:00
Aaron Giles
b81f497a93 Fix a couple of compile errors, leftover debugging. 2014-03-11 15:58:45 +00:00
Aaron Giles
4ea9df02a1 Moved core template container classes up from emutempl.h to coretmpl.h:
[Aaron Giles]
 * these classes now no longer take a resource_pool; everything is
    managed globally -- this means that objects added to lists must be
    allocated with global_alloc
 * added new auto_pointer<> template which wraps a pointer and auto-frees
    it upon destruction; it also defaults to NULL so it doesn't need to
    be explicitly initialized
 * moved tagged_list template to tagmap.h

Redo of the low-level memory tracking system: [Aaron Giles]
 * moved low-level tracking out of emu\emualloc into lib\util\corealloc
    so it can be shared among all components and used by core libraries
 * global_alloc and friends no longer use a resource pool to track
    allocations; turns out this was a wholly redundant system that wasted
    a lot of memory
 * removed global_resource_pool entirely
 * added global_free_array to delete arrays allocated with 
    global_alloc_array
 * added tracking of object versus array allocation; we will now error
    if you use global_free on an array, or global_free_array on an object

Added new utility helper const_string_pool which can be used to 
efficiently accumulate strings that are not intended to be modified.
Used by updated makelist and software list code. [Aaron Giles]

Updated png2bdc and makelist tools to not leak memory and use more modern
techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles]

Deprecated auto_strdup and removed all uses by way of caller-managed 
astrings and the software list rewrite. [Aaron Giles]

Rewrote software list management: [Aaron Giles]
 * removed the notion of a software_list that is separate from a
    software_list_device; they are one and the same now
 * moved several functions into device_image_interface since they really
    didn't belong in the core software list class
 * lots of simplification as a result of the above changes

Additional notes (no whatsnew):

Moved definition of FPTR to osdcomm.h.

Some changes happened in the OSD code to fix issues, especially regarding
freeing arrays. SDL folks may need to fix up some of these.

The following devices still are using tokens and should be modernized
(I found them because they kept their token as void * and tried to
delete it, which you can't):

namco_52xx_device (mame/audio/namco52.c)
namco_54xx_device (mame/audio/namco54.c)
namco_06xx_device (mame/machine/namco06.c)
namco_50xx_device (mame/machine/namco50.c)
namco_51xx_device (mame/machine/namco51.c)
namco_53xx_device (mame/machine/namco53.c)
voodoo_device (emu/video/voodoo.c)
mos6581_device (emu/sound/mos6581.c)
aica_device (emu/sound/aica.c)
scsp_device (emu/sound/scsp.c)
dmadac_sound_device (emu/sound/dmadac.c)
s3c2440_device (emu/machine/s3c2440.c)
wd1770_device (emu/machine/wd17xx.c)
latch8_device (emu/machine/latch8.c)
duart68681_device (emu/machine/68681.c)
s3c2400_device (emu/machine/s3c2400.c)
s3c2410_device (emu/machine/s3c2410.c)
strataflash_device (mess/machine/strata.c)
hd63450_device (mess/machine/hd63450.c)
tap_990_device (mess/machine/ti99/990_tap.c)
omti8621_device (mess/machine/omti8621.c)
vdt911_device (mess/video/911_vdt.c)
apollo_graphics_15i (mess/video/apollo.c)
asr733_device (mess/video/733_asr.c)
2014-03-11 15:54:58 +00:00
Oliver Stöneberg
3138b2c660 second round of clang 3.4 fixes for MESS (nw) 2014-02-20 18:18:29 +00:00
Miodrag Milanovic
e533a04f2e changed rest of devices (except cpu cores) to have shortname and sourcefile (nw) 2013-06-21 14:44:06 +00:00
Michaël Banaan Ananas
55ac5a4ca5 let's increase approx matches for gamenames from 10 to 16 2013-05-21 19:01:48 +00:00
Fabio Priuli
03a307737c Added some additional xml validation and fixed the resulting errors. nw. 2013-03-21 07:41:38 +00:00
Oliver Stöneberg
ec7dce3ea3 fixed name of software_list_device (nw) 2013-03-19 11:01:56 +00:00
Miodrag Milanovic
a440a8e020 Cleanups and version bump 2013-02-11 07:44:56 +00:00
Oliver Stöneberg
36cc9b2999 fixed crash in software_find_romdata() (nw) 2013-02-01 22:35:04 +00:00
Wilbert Pol
6f4ef20328 softlist.c: Fix handling of software list entries without any datearea definition. This fixes romident crashing on the cpm set from the c64_cart list. (nw) 2013-02-01 22:06:17 +00:00
smf-
1940866c70 output of new srcclean changes that are relatively small [smf] 2013-01-11 19:43:14 +00:00
Miodrag Milanovic
0e19f641d3 Cleanups and version bump 2013-01-11 07:32:46 +00:00
Olivier Galibert
82191eb25f floppy: Correctly reach files inside zips or softlists [O. Galibert] 2013-01-02 11:24:18 +00:00
Miodrag Milanovic
fec0896151 patch that enables output of <info> elements stored in software lists through -listsoftware [qmc2] 2012-08-22 14:02:55 +00:00
Curt Coder
41004e93d1 Sync with MESS. (nw) 2012-08-16 17:59:34 +00:00
Miodrag Milanovic
468c215b0b Fix for required softlist item loading (no whatsnew) 2012-03-30 09:02:46 +00:00
Miodrag Milanovic
a2591e4206 Added support for multiple comma separated interfaces for device (no whatsnew) 2012-03-29 07:01:13 +00:00
Scott Stone
a4098e8a3a Some cleanup of some observed #include redundancy from source files which use emu.h (nw) 2012-02-06 01:30:22 +00:00
Miodrag Milanovic
c8b1d724d9 Do the softlist validation only on validate command (no whatsnew) 2012-02-05 09:15:57 +00:00
Fabio Priuli
dd6e634ef2 fixed crash when loading from softlist with -cart/-flop/-cass switch. 2012-01-31 06:40:59 +00:00
Miodrag Milanovic
9720d9b577 Fix regression on softload item load using menus (no whatsnew) 2012-01-30 14:32:31 +00:00
Aaron Giles
ed0207f126 Move devices into a proper hierarchy and handle naming
and paths consistently for devices, I/O ports, memory
regions, memory banks, and memory shares. [Aaron Giles]

NOTE: there are likely regressions lurking here, mostly
due to devices not being properly found. I have temporarily
added more logging to -verbose to help understand what's
going on. Please let me know ASAP if anything that is being
actively worked on got broken.

As before, the driver device is the root device and all 
other devices are owned by it. Previously all devices
were kept in a single master list, and the hierarchy was
purely logical. With this change, each device owns its
own list of subdevices, and the hierarchy is explicitly
manifest. This means when a device is removed, all of its
subdevices are automatically removed as well.

A side effect of this is that walking the device list is
no longer simple. To address this, a new set of iterator
classes is provided, which walks the device tree in a depth
first manner. There is a general device_iterator class for
walking all devices, plus templates for a device_type_iterator
and a device_interface_iterator which are used to build
iterators for identifying only devices of a given type or
with a given interface. Typedefs for commonly-used cases
(e.g., screen_device_iterator, memory_interface_iterator)
are provided. Iterators can also provide counts, and can
perform indexed lookups.

All device name lookups are now done relative to another 
device. The maching_config and running_machine classes now
have a root_device() method to get the root of the hierarchy. 
The  existing machine->device("name") is now equivalent to
machine->root_device().subdevice("name").

A proper and normalized device path structure is now
supported. Device names that start with a colon are
treated as absolute paths from the root device. Device
names can also use a caret (^) to refer to the owning
device. Querying the device's tag() returns the device's
full path from the root. A new method basetag() returns
just the final tag.

The new pathing system is built on top of the 
device_t::subtag() method, so anyone using that will 
automatically support the new pathing rules. Each device
has its own internal map to cache successful lookups so
that subsequent lookups should be very fast.

Updated every place I could find that referenced devices,
memory regions, I/O ports, memory banks and memory shares
to leverage subtag/subdevice (or siblingtag/siblingdevice
which are built on top).

Removed the device_list class, as it doesn't apply any
more. Moved some of its methods into running_machine
instead.

Simplified the device callback system since the new 
pathing can describe all of the special-case devices that
were previously handled manually.

Changed the core output function callbacks to be delegates.

Completely rewrote the validity checking mechanism. The
validity checker is now a proper C++ class, and temporarily
takes over the error and warning outputs. All errors and 
warnings are collected during a session, and then output in
a consistent manner, with an explicit driver and source file
listed for each one, as well as additional device and/or
I/O port contexts where appropriate. Validity checkers 
should no longer explicitly output this information, just
the error, assuming that the context is provided.

Rewrote the software_list_device as a modern device, getting
rid of the software_list_config abstraction and simplifying
things.

Changed the way FLAC compiles so that it works like other
external libraries, and also compiles successfully for MSVC
builds.
2012-01-24 20:18:55 +00:00
Angelo Salese
7b631e4c5b Clean-ups and version bump 2012-01-15 21:40:54 +00:00
Fabio Priuli
0441bb0ea8 softlist: added validation check against multiple parts with the same name. no whatsnew. 2012-01-09 20:39:48 +00:00
Miodrag Milanovic
5e0e5c8bc7 Revering kludge not needed when proper counting is done (no whatsnew) 2012-01-09 06:48:35 +00:00
Olivier Galibert
6a9a45fe06 softlist: Fix entry count tracking issue [O. Galibert] 2012-01-08 21:30:50 +00:00
Olivier Galibert
b9209b1c35 uiimage/diimage: Dumbify the menus and add a control layer [O. Galibert] 2012-01-07 09:03:36 +00:00
Miodrag Milanovic
4c0893611a Fixed allocating of multiple parts in softlist (no whatsnew) 2012-01-05 10:13:05 +00:00
Fabio Priuli
505dbc504b softlist.c: no_dump CHDs should not trigger validation errors. no whatsnew. 2012-01-04 14:28:08 +00:00
Aaron Giles
64f1231c63 Removed old C-based interface to astrings. astring exists only as
a class now. Updated all stragglers (mostly tools) to use the class
form. [Aaron Giles]
2012-01-03 00:21:13 +00:00
Miodrag Milanovic
3aa2419b1e Fixed item search in softlist if no list is specified (no whatsnew) 2011-12-26 08:23:49 +00:00
Angelo Salese
7e812d10d3 Clean-ups and version bump 2011-12-24 21:49:38 +00:00
Miodrag Milanovic
1a23f11816 softlist now copies all parts too to loaded software_info section (no whatsnew) 2011-12-23 10:17:22 +00:00
Miodrag Milanovic
94493777d6 Fixed required image loading (no whatsnew) 2011-12-22 15:53:25 +00:00