Commit Graph

91 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
Olivier Galibert
02027ddfcc debug/qt: Add a per-device window [O. Galibert]
There probably is interesting information to add, and it can look
better.  Anybody, feel free to enhance it :-)
2014-12-22 20:16:45 +01:00
Miodrag Milanovic
c93ed344fb Cleanups and version bump 2014-10-15 07:19:47 +00:00
Fabio Priuli
af109faa26 better fix. nw. 2014-09-17 11:08:54 +00:00
Fabio Priuli
05221b7ecc softlist: restored the support for loading games from compatible
softlists (like gbcolor games in gameboy, and viceversa, msx1
carts in msx2, etc.) by using the syntax
  mess system -media list:gamename 
You can now for instance use again "mess gbcolor -cart gameboy:sml"
to play "Super Mario Land" with the custom palettes of the Game 
Boy Color. [Fabio Priuli]
2014-09-17 10:12:27 +00:00
Miodrag Milanovic
0ac942c9b8 Cleanup of image device interfaces (nw) 2014-05-02 12:10:55 +00:00
Fabio Priuli
593b53d73b image.c: Added support for loading a default battery, instead of a fixed fill value, when no
battery is found. This allows for loading factory formatted sram/nvram from softlist. [Fabio Priuli]

(MESS) nes.c: Fixed Silva Saga, which relies on SRAM not being 0x00 filled from factory,
with many thanks to naruko for investigating the problem. [Fabio Priuli]
2014-05-02 08:32:21 +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
Miodrag Milanovic
fec65e0b57 Cleanups and version bump 2014-04-07 06:04:18 +00:00
Nathan Woods
01d2320c95 Factored ui_menu_control_device_image into ui/imgcntrl.c 2014-04-05 14:11:56 +00:00
Oliver Stöneberg
2d3b6aece1 some dynamic_buffer/dynamic_array usage cleanups (nw) 2014-03-29 19:40:53 +00:00
Oliver Stöneberg
089ba456f4 converted some global_alloc_array() usage to dynamic_array/dynamic_buffer (nw) 2014-03-28 17:44:24 +00:00
Oliver Stöneberg
513738066d replaced some malloc/free usage with global_alloc_array/global_free_array (nw) 2014-03-28 15:02:02 +00:00
Oliver Stöneberg
47f4030a92 fixed memory leaks in diimage.c (nw) 2014-03-27 21:20:44 +00:00
Oliver Stöneberg
2e5ea37f65 removed mame_* aliases and just use core_* functions (nw) 2014-03-24 22:05:08 +00:00
Oliver Stöneberg
b52f668f13 some mismatched malloc/free usage with osd_* functions (nw) 2014-03-24 21:44:43 +00:00
Miodrag Milanovic
0f7ed4c919 fixed nvram save location by setting proper name (nw) 2014-03-13 15:36:58 +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
f3e7bd7fd2 added a few more missing \n in logging / cleanups (nw) 2014-03-10 16:17:31 +00:00
Curt Coder
a2aee72cb3 Fixed software list regression. (nw) 2014-02-14 22:18:15 +00:00
Curt Coder
21c0d4913c diimage: Added "read_only" feature to the software list to denote write protected images. [Curt Coder]
(MESS) c64: Fixed Bounty Bob Strikes Back loading. (nw)
2014-02-13 22:47:03 +00:00
Nathan Woods
fb7edb68c6 Moved src/emu/ui.? ==> src/emu/ui/ui.?, changed to follow MAME OOP conventions; we now have a ui_manager class 2014-01-29 11:47:56 +00:00
Nathan Woods
7cc05c4256 Broke apart src/emu/ui/filemngr.?, moved src/emu/uiswlist.? ==>
src/emu/ui/swlist.?
2014-01-20 18:59:37 +00:00
Nathan Woods
8c69a2ebda Split uiimage.? ==> ui/filemngr.? and ui/tapectrl.? 2014-01-19 16:26:00 +00:00
Miodrag Milanovic
ca546caa6e Cleanups and version bump 2013-12-24 07:24:51 +00:00
Curt Coder
7afab9bda2 diimage: Added load_software_region() function that loads a software list region into a shared_ptr. [Curt Coder] 2013-12-20 16:03:02 +00:00
Aaron Giles
71fbb5edc2 Added license tags to a few more files. Also converted many of OG's
BSD licenses to tags since when he copied & pasted them he forgot to
remove one instance of my name, which I caught while searching. ;-)
2013-10-16 09:38:09 +00:00
Miodrag Milanovic
a440a8e020 Cleanups and version bump 2013-02-11 07:44:56 +00:00
Fabio Priuli
336dc3ca2d diimage.c: error out if xml is incomplete instead of crashing. no whatsnew. 2013-01-24 19:05:12 +00:00
R. Belmont
f6c44c6e9b MIDI core updates: [R. Belmont]
- Add MIDI in and out ports as image device types
- Add OSD calls to check for and read MIDI input
- Add MIDI in image device which reads input and converts it to a serial bitstream

nw section:
Note that the MIDI In device uses the new image device override to prevent the core from attempting to fopen() the "file" name and instead it handles open/close itself in call_load/call_unload.  This allows greater flexibilty than the hack used for sockets/ptys/named pipes where the OSD file layer has to know about them.
2013-01-13 03:48:10 +00:00
R. Belmont
7cd142d28d diimage: allow image devices to skip core fopen() of the image's filename and handle themselves in call_load() [R. Belmont] 2013-01-12 04:46:30 +00:00
Miodrag Milanovic
0e19f641d3 Cleanups and version bump 2013-01-11 07:32:46 +00:00
Miodrag Milanovic
c03cc535d8 verify softlist items that are not CHDs or roms and display warnings/errors (no whatsnew) 2012-10-11 10:18:59 +00:00
Oliver Stöneberg
679e9323be added missing \n to some more fatalerror() calls (no whatsnew) 2012-09-08 11:47:17 +00:00
Miodrag Milanovic
894a91d188 DEVINFO_* to CPU_INFO_*, and some cleanups (no whatsnew) 2012-09-03 18:24:54 +00:00
Oliver Stöneberg
97dbb9484f removed unnecessary strlen() usage (no whatsnew) 2012-07-27 15:37:39 +00:00
mahlemiut
462073ccf4 Added device image type for individual ROM images (as used in some Amstrad CPC applications) (no whatsnew) 2012-05-07 12:12:57 +00:00
Aaron Giles
18f33f4eff Changed device->subregion to device->memregion. Moved
memory_region management into the memory manager instead
of directly in the machine. Hid the global region method;
now all regions must be looked up relative to a device.

If you're a member function, you can just use memregion("tag") 
directly. If you're a global function or a device referencing
global regions, use machine().root_device().memregion("tag")
to look up regions relative to the root.

S&R to convert all references:

machine([()]*)\.region
machine\1\.root_device\(\).subregion

Then remove redundant machine().root_device() within src/mame:

([ \t])machine\(\)\.root_device\(\)\.
\1

And use state->memregion() if we have a state variable present:

(state *= *[^;]+driver_data[^}]+)([^ \t]*)machine[()]*\.root_device\(\)\.
\1state->

Finally some cleanup:

screen.state->
state->

device->state->
state->

space->state->
state->

And a few hand-tweaks.
2012-04-20 05:54:39 +00:00
Aaron Giles
3e575ad6b9 Move driver list/enumerator to new file drivenum.c/.h.
Move game_driver definition and constants to new header gamedrv.h.
2012-04-06 19:59:27 +00:00
Miodrag Milanovic
03b1554443 Display softlist in menu only for devices having interface set (no whatsnew) 2012-03-30 08:16:34 +00:00
Miodrag Milanovic
686e8cea52 Sync with MESS (no whatsnew) 2012-03-06 07:30:55 +00:00
Angelo Salese
04145d0b62 Clean-ups and version bump 2012-02-26 14:31:24 +00:00
Miodrag Milanovic
bb0f3da064 Give more proper name and disabled loading of soflist items in open_image_file call (no whatsnew) 2012-02-21 12:43:14 +00:00
Miodrag Milanovic
dab559f2aa Added helpers for loading file for slot determination (no whatsnew) 2012-02-21 10:27:17 +00:00
Aaron Giles
e055a551c1 Remove redundant hashing code, use hashing.h instead.
Remove overabstraction in hash.h; it's ok to hard code the
two types of hashes we have. Even adding another one would
not be very difficult. ;)
2012-02-16 21:53:30 +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
Angelo Salese
97685083b1 Clean-ups and version bump 2012-02-05 15:14:28 +00:00
Fabio Priuli
5959fe4893 workaround for softlist images ending up with the wrong basename. this fixes problems with nvram and snap handling in softlist. no whatsnew.
I'm not sure if the change from "m_image_name = softlist:gamename" to "m_image_name = softlist:gamename:partname" was done on purpose, but given how close we are to the release, I think it's safer to fix it here than to modify the softlist code.
2012-02-05 09:59:02 +00:00