Commit Graph

57 Commits

Author SHA1 Message Date
Olivier Galibert
7c8a1fa409 Pet peeving with extreme prejudice (nw) 2017-11-30 12:29:32 +01:00
Vas Crabb
b0784f425b Make ROM BIOS reported in listxml output match what ROM loading does
(nw) This is the soure of the "BIOS can only apply to one region" meme -
it actually works for all regions, but the listxml output was wrong,
making it look like it didn't work.
2017-09-18 18:38:29 +10:00
Vas Crabb
796b585f72 Turn most of the ROM entry accessor macros into templates, and make them work on tiny_rom_entry/rom_entry pointers/references, also claw back a little performance lost in the ROM entry refactoring 2017-09-18 14:23:08 +10:00
Vas Crabb
152ce7a3d9 Fix -slot card,bios=rev (selected BIOS was being applied to slot itself, not card) 2017-08-04 13:07:34 +10:00
Nathan Woods
4af745e751 Changed Romload to show all actual hashes on a mismatch 2017-07-18 23:05:56 +10:00
npwoods
b193e05cd7 Overhaul to how MAME handles options, take two (#2341) 2017-06-25 12:48:56 +10:00
Vas Crabb
a400c011a9 Revert "Overhaul to how MAME handles options (#2260)"
This reverts commit 536990e77b.

Conflicts:
	src/frontend/mame/mame.cpp

Sorry, but this change was half-baked.  It breaks a lot of existing
functionality and clearly hasn't been tested in more than a tiny subset
of use cases.  Please play this work back onto your own branch, and test
it before submitting another PR.
2017-05-07 14:40:12 +10:00
npwoods
536990e77b Overhaul to how MAME handles options (#2260)
This is an overhaul to how MAME handles options to provide a better foundation for what MAME is already doing in practice. Previously, core_options was designed to provide an input/output facility for reading options from the command line and INI files. However, the current needs (image/slot/get_default_card_software calculus and MewUI) go way beyond that.

Broadly, this PR makes the following changes:
* core_options now has an extensibility mechanism, so one can register options that behave dramatically differently
* With that foundation, emu_options now encapsulates all of the funky image/slot/get_default_card_software calculus that were previously handled by static methods in mameopts.cpp. Changes to emu_options should not automatically cascade in such a way so that it stays in a consistent state
* emu_options no longer provides direct access to the slot_options/image_options maps; there are simpler API functions that control these capabilities
* Many core_options functions that expose internal data structures (e.g. - priority) that were only really needed because of previous (now obsolete) techniques have been removed.
* core_options is now exception based (rather than dumping text to an std::string). The burden is on the caller to catch these, and discern between warnings and errors as needed.

Obviously this is a risky change; that's why this is being submitted at the start of the dev cycle.
2017-05-05 16:17:49 +10:00
Vas Crabb
dac6dc4f62 srcclean (nw) 2017-04-23 12:27:42 +10:00
npwoods
8bd25ca793 Workaround for sibling disk image loading issue (#2246)
Gory details in the comments
2017-04-19 15:03:45 +02:00
Nathan Woods
fbb7d927d3 Refactoring in response to MT#6531
Prior to this change, options for images and slots were stored in the emu_options collection.  Anything that might restart the emulation (such as slot changes and images that reset on load) had to manipulate the emu_options structure directly.  The dynamic nature of images and slots meant that some elaborate conventions for setting up this collection had to be understood by clients.

After this change, emu_options has two new members (image_options and slot_options) that expose image and slot selections via an std::map.  Anything that changes images or slots in a fashion that needs to persist across sessions needs to modify these data structures.  Additionally, some of the hairly logic (e.g. - get_default_card_software) now records its data here rather than trying to subvert the core_options system.

This is how MT#6531 was fixed; now when diimage.cpp sees an image that resets on load, it just modifies the image_options structure and forces a reset.  This allowed some further cleanups to happen within diimage.

This should be considered a very risky change, and scrutiny/feedback is welcome.  In particular, there seems to be functionality surrounding device bioses that I'm not 100% sure how it works; the syntax seems to imply that it only works on slot devices.
2017-04-06 11:20:45 +10:00
Vas Crabb
8179a84458 Introduce u8/u16/u32/u64/s8/s16/s32/s64
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h"
* Get rid of import of cstdint types to global namespace (C99 does this anyway)
* Remove the cstdint types from everything in emu
* Get rid of U64/S64 macros
* Fix a bug in dps16 caused by incorrect use of macro
* Fix debugcon not checking for "do " prefix case-insensitively
* Fix a lot of messed up tabulation
* More constexpr
* Fix up many __names
2016-11-19 05:38:48 +11:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
Miodrag Milanovic
d2e8f61149 dynamic_buffer is just std::vector<UINT8> (nw) 2016-10-21 12:35:05 +02:00
Vas Crabb
33b2c73395 srcclean (nw) 2016-09-26 04:51:59 +10:00
Miodrag Milanović
f67311c5a5 Merge pull request #1180 from npwoods/split_softlist_code_redo
Redo of split of src/emu/softlist.[cpp|h]
2016-08-08 13:43:06 +02:00
Nathan Woods
f5968efcea C++-fiied code that iterates over rom_entry arrays (without usage of rom_[first|next]_*) 2016-08-07 10:29:51 -04:00
Nathan Woods
7f5e233933 Created a tiny_rom_entry structure for the purposes of rom_entry declarations in code, and a first pass at the required core changes
to unpack tiny_rom_entry structures at runtime.

WARNING - I've done preliminary testing on a tiny build (pacman works), but nothing more.  I know for a fact that a full compile fails
2016-08-06 08:54:37 -04:00
Robbbert
a475f61dd8 Fixed ROM_FILL when fill value is hex. 2016-08-05 14:06:16 +10:00
Nathan Woods
f9db568146 Redo of split of src/emu/softlist.[cpp|h]
This is a redo of the split first submitted in #137, with the following differences:
* The newly refactored rom_entry data structure is used
* I've kept the refactored softlist code in src/emu, in order to defer the mechanical process of moving it
* I've kept includes of softlist[_dev].h out of diimage.h, so that changes to either do not trigger an emu.h recompilation
* Obviously, this goes against the latest master
2016-08-02 17:40:49 -04:00
Nathan Woods
a2b0b2fbd4 Fixed breakage caused by a change in how the byte for ROM_FILL is represented with recent changes 2016-08-01 19:46:53 -04:00
Nathan Woods
7384598c25 Added some default constructors to rom_entry(), and made it so changes to flags are done through a set_flags() accessor method 2016-08-01 08:48:23 -04:00
Nathan Woods
ee302246c9 Changes rom_entry from a struct to a class, storing its strings as std::string and separated the declaration into a new header.
This should really be followed up by further changes to eliminate the usage of the weird accessor macros in favor of conventional C++
accessors
2016-08-01 08:01:34 -04:00
Miodrag Milanovic
6f5e223853 for bool type use true and false (nw) 2016-07-31 20:02:56 +02:00
Miodrag Milanovic
9667c6a8cc std::min and std:max instead of MIN and MAX, also some more macros converted to inline functions (nw) 2016-07-31 14:41:02 +02:00
Nathan Woods
a7bfc73cfb Changed various string arguments for emu_file::open() from 'const char *' to std::string 2016-07-29 20:53:46 -04:00
Nathan Woods
4aa0ab1724 Moved src/emu/hash.[cpp|h] into src/lib/util, and namespaced that code (and hashing.[cpp|h]) into util:: 2016-07-23 12:49:33 -04:00
Nathan Woods
c86ab9dbac Exposed several strings as std::string on softlist objects, and fixed a few bugs 2016-07-20 09:44:27 -04:00
Nathan Woods
12369fe758 const correctness related changes to softlist 2016-07-19 20:40:45 -04:00
Miodrag Milanovic
63f9a01f8c Cleanup and version bump 2016-06-29 08:34:30 +02:00
angelosa
b49b23b7df Added command strobe callback interface for LDV1000, and hooked it up to esh.cpp driver. [Angelo Salese]
(out of whatsnew: also fixed irq 0 hookup, using device_timer to ack an irq for MAME is never a good idea)
2016-06-15 19:38:04 +02:00
angelosa
6df371a0f1 romload.cpp: added ROMX_FILL, passing a ROM_SKIP(param_value) will fill and skip just like a ROM_LOAD16_BYTE macro [Angelo Salese]
Added line blinking and overlay opacity selectors for esh.cpp [Angelo Salese]
Some minor improvements for LDP-1000 (nw)
2016-06-15 03:51:52 +02: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
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
Robbbert
a15f3fde77 Fix rom load warning messages (nw) 2016-02-29 23:27:12 +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
Miodrag Milanovic
2041d88978 Remove redundant defines, in order to make translation easier (nw) 2016-02-20 17:40:05 +01:00
Dankan1890
701df7fe9e Initial import of MEWUI to MAME [Dankan1890] 2016-02-04 15:14:24 +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
7c9cd3feea Revert "rest of device parameters to std::string (nw)"
This reverts commit caba131d84.
2016-01-20 21:35:11 +01:00
Miodrag Milanovic
abb7f223b3 Revert "Fix for hang, emu_options::add_slot_options was changed, other things are just cleanup (nw)"
This reverts commit 841a55985e.
2016-01-20 21:32:11 +01:00
Miodrag Milanovic
684132719f Revert "Memory region to use std::string (nw)"
This reverts commit 14d0bff4d0.
2016-01-20 21:31:21 +01:00
Miodrag Milanovic
14d0bff4d0 Memory region to use std::string (nw) 2016-01-20 16:04:07 +01:00
Miodrag Milanovic
841a55985e Fix for hang, emu_options::add_slot_options was changed, other things are just cleanup (nw) 2016-01-18 14:39:13 +01:00
Miodrag Milanovic
caba131d84 rest of device parameters to std::string (nw) 2016-01-16 20:05:32 +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