Commit Graph

81 Commits

Author SHA1 Message Date
Olivier Galibert
28104cdbdf chd: Add dvd support. better abstraction in general, multi-image support in arcade-type drivers 2023-05-04 20:29:58 +02:00
AJR
60a3acb970 Move UTF8_xxx string literal macros to new header in lib/util 2022-09-25 22:23:29 -04:00
Olivier Galibert
e4564eb99a cdrom_file: classify. Could use more internal work, but it's a step 2022-04-01 11:36:55 +02:00
Vas Crabb
a185091855
Addressed some Lua scripting pitfalls. (#9294)
Addressed pure virtual function call crash on end of emulation session
if you haven't explicitly removed all address space taps, memory
corruption on end of emulation session if you haven't explicitly removed
all address space change notifiers, and symbol being garbage-collected
out from under you while you have parsed expressions or other symbol
tables that depend on them.

Removed the copy constructor for parsed expressions as the underlying
C++ copy constructor appears to be broken, and simplified symbol table
constructors.  Also made symbol table add methods return the new entry
to avoid the need for an extra lookup.

Fixed breakpoint/watchpoint objects being inappropriately copied into
the tables returned by bplist() and wplist(), allowing the enabled
property to be modifiable for breakpoint and watchpoint objects in Lua.

Fixed drivers and devices causing a new memory pass-through handler to
be allocated on each soft reset, and fixed multiple instances of taps
being installed in the event the machine is reset before the tap is
removed.

Added classes for managing broadcast subscriptions, and adapted address
spaces to use this for change notifications.
2022-02-12 04:10:39 +11:00
Vas Crabb
d64ea5331b
-frontend: Refactored menu event handling and fixed a number of issues. (#8777)
* Moved common code for drawing about box, info viewer, and other text box menus to a base class; removed the last of the info viewer logic and the multi-line item hack from the base menu class.
* Added previous/next group navigation for general inputs and plugin input selection menus.
* Moved message catalog logic to lib/util, allowing osd and emu to use localised messages.
* Made the base menu class use the UI manager’s feature for holding session state rather than a static map and mutex.
* Improved menu event handling model, and fixed many issues, particularly with menus behaving badly when hidden/shown.
* Added better support for menus that don’t participate in the usual menu stack, like the menuless sliders and the save/load state menus.
* Made a number of menus refresh state when being shown after being hidden (fixes MT08121 among other issues).
* Fixed indication of mounted slot option in the slot option details menu.
* Improved appearance of background menus when emulation isn't running - draw all menus in the stack, and darken the background menus to make the edges of the active menu clearer.
* Fixed locale issues in -listxml.

-debugger: Made GUI debuggers more uniform.
* Added new memory view features to Win32 debugger.
* Fixed spelling of hexadecimal in Cocoa debugger and added decimal address option.
* Fixed duplicate keyboard shortcut in Cocoa debugger (Shift-Cmd-D was both new device window and 64-bit float format).
* Made keyboard shortcuts slightly more consistent across debuggers.

-plugins: Moved input selection menu and sequence polling code to a common library.  Fixed the issue that prevented keyboard inputs being mapped with -steadykey on.

-docs: Started adding some documentation for MAME's internal UI, and updated the list of example front-ends.

-Regenerated message catalog sources.  For translators, the new strings are mostly:
* The names of the inputs provided by the OS-dependent layer for things like fullscreen and video features. These show up in the user interface inputs menu.
* The names for automatically generated views. These show up in the video options menu - test with a system with a lot of screens to see more variants.
* The input macro plugin UI.
* A few format strings for analog input assignments.
* A few strings for the about box header.
2021-10-31 12:31:16 +11:00
Vas Crabb
38082ccbee
Overdue internal UI enhancements (#8674)
* frontend: Added support for message context to localisations.
* frontend: Added string_view versions of the message lookup functions.
* frontend: Added a few more folder options to the internal UI.
* emu/softlist.cpp: Use more appropriate containers.
* Switched to Python 3 by default - this will become a requirement.
* Updated msgfmt.py for message context support.
* frontend: Show all software item info in the internal UI.
* frontend: Search alternate titles in software selection menu.
* 3rdparty/utf8proc: Updated to v2.6.1 (has several fixes).
* frontend: Added software filters for common info fields.
* frontend: Allow UI manager to hold onto persistent session data.
* frontend: Cache software lists for eight machines.
* frontend: Added support for loading localised system names.
* frontend: Add UI for selecting localised system names.
2021-10-09 12:16:17 +11:00
Vas Crabb
aeb9eae874
util: Further API cleanups: (#8661)
* Turned `core_file` into an implementation of `random_read_write`.
* Turned PNG errors into a standard error category.
* Added a helper for generating what look like derived classes on-the-fly.
2021-10-05 03:34:45 +11:00
AJR
ccaa00b3ed Move endianness type into lib/util header 2021-08-31 12:30:11 -04:00
Vas Crabb
e8bbea1fc6
formats, osd, util: Started refactoring file I/O stuff. (#8456)
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic.  Also replaced core_file's build-in zlib compression with a filter.

unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename.

Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums.

Allow mounting TI-99 RPK from inside archives.
2021-08-22 09:06:15 +10:00
Vas Crabb
50da25ae5b -util: Retire legacy object pool, removing vestigial references.
Thanks to AJR, Ivan Vangelista and Aaron Giles for helping make this
possible.

Also fixed debug build of imgtool.
2021-06-24 23:12:27 +10:00
AJR
c47ed0112e coretmpl.h: Move lru_cache_map to separate header 2021-02-03 17:42:14 -05:00
Vas Crabb
b90fd35515 Various improvements to image file handling:
Moved MS DIB parser out of ICO file reader and made it available for
artwork and layout images.

Added more efficient I/O and better error checking for JPEG file loading
(MAME will no longer exit immediately on a bad JPEG file).

Made caller responsible for opening files for loading images, to avoid
decompressing images used in ZIP/7z artwork multiple times.

Added support for JPEG and Windows DIB to picture_image_device.

Added support for SVG image files in external artwork.

Added support for using I/O port value for animation state and masking
animation state values.

Made bounds elements more flexible in layouts.

Reworked headers to reduce dependencies.

Updated layout file format documentation.
2020-10-08 02:04:31 +11:00
Vas Crabb
af82c0eca8 util: re-implement SHA-1 and get rid of the two third-party implementations (nw) 2020-04-13 06:16:03 +10:00
Vas Crabb
d2f3d02908 pre-fill things allocated with operator new with 0xcd in debug builds (value can be changed by setting global g_mame_new_prefill_byte with a debugger) - this is gonna hurt performance, but it will help catch issues exposed when we remove pre-clearing before constructing devices 2019-11-25 03:20:08 +11:00
Olivier Galibert
6caef2579a dvdisasm: Overhaul [O. Galibert]
Disassemblers are now independant classes.  Not only the code is
cleaner, but unidasm has access to all the cpu cores again.  The
interface to the disassembly method has changed from byte buffers to
objects that give a result to read methods.  This also adds support
for lfsr and/or paged PCs.
2017-11-26 17:41:27 +01:00
dankan1890
0e638ad0a2 Lua scripts cleanup. 2017-05-14 14:20:38 +10:00
Julian Sikorski
c50ddac28b Fixed building using system utf8proc 2017-01-26 09:28:21 +11:00
Miodrag Milanovic
63e3f48775 Added initial HTTP/HTTPS webserver/websocket server support (nw) 2017-01-04 16:15:57 +01:00
Miodrag Milanovic
dbbd5e9c98 As promised, removing this part of code since it is used for compilers check, no need for this to be in release (nw) 2016-11-23 08:37:05 +01:00
Miodrag Milanovic
fc58a0bec8 Added basic HTTP server, not active yet, based on ASIO example with small refactoring included (nw) 2016-11-07 10:42:23 +01:00
Vas Crabb
75be4dff5f While I'm causing full recompiles all the time, reduce necessary number of instantiations of parts of string formatting engine 2016-08-27 16:45:53 +10:00
Miodrag Milanovic
4f84793a05 made proper formats compiled only if needed (nw) 2016-08-12 18:27:54 +02:00
Miodrag Milanovic
b966180061 Compile netlist and lua only if used (nw) 2016-08-12 15:03:45 +02:00
Nathan Woods
c77310389e Removed src/lib/util/cstrpool.[cpp|h]; it is no longer used 2016-08-05 08:29:32 -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
Nigel Barnes
9104c9d523 renamed bbc_dsk to acorn_dsk
- split ssd/dsd formats
- added opus ddos format
- split adfs into oldmap and newmap formats for archimedes
- logging
2016-07-16 19:48:44 +01:00
Nathan Woods
5009b55430 Introduced src/lib/util/timeconv.[c|h], moved code from un7z.cpp into it, and implemented win_time_point_from_filetime() in terms of it 2016-06-26 08:12:07 -04:00
Miodrag Milanovic
1d0e0ac12a remove all usages of tagmap 2016-06-18 15:32:15 +02:00
Nigel Barnes
e4ea1303b3 e01: added acorn filestore floppy format and softlist 2016-06-05 22:53:37 +01:00
AJR
fb08fefaee Move a few odds and ends out of the emu core 2016-04-23 15:27:59 -04:00
Olivier Galibert
cdc04a9b7c screen: POC||GTFO of svg rendering from inside the rom. [O. Galibert]
It's damn slow, ~50ms/frame on cdkong.  Caching and/or hw accel will
solve that easily.  It doesn't look very good, nanosvg need better
anti-aliasing.  It also doesn't do texturing very well and images not
at all, so some of our current svgs won't look good.  But all that's
fixable.
2016-04-04 11:33:34 +02:00
Jeffrey Clark
c3397ae4a9 fix include dirs (nw) 2016-03-29 00:45:53 -07:00
Jeffrey Clark
9d9c8fad6a Extend system library support (nw)
Extend USE_SYSTEM_LIB_* to support providing the library name and include directory.
To link against system specific lib names and header path: (ref #711)

USE_SYSTEM_LIB_LUA=lua5.3:/usr/include/lua5.3
2016-03-28 22:26:52 -05:00
Vas Crabb
a830ea7627 * Support *n conversion in stream_format/string_format
* Make stream_format return characters printed
* Add iostreams with std::vector storage
* Move to type-safe templates for logerror and popmessage
* Remove now-unnecessary I64FMT from calls to logerror/popmessage
* Put some lib/util stuff in util:: namespace
* Some fixes to Japanese translation
2016-03-01 06:52:36 +11:00
Miodrag Milanovic
fff0c4d054 removed corealloc.cpp file from build (nw) 2016-01-08 12:42:04 +01:00
Miodrag Milanovic
9a2ed1703a tagged_list without tagmap_t (nw) 2015-12-11 13:59:37 +01:00
Miodrag Milanovic
6a765a95ec Added addprojectflags function and added -Wsuggest-override for all that are not 3rdparty projects.
It is place where all additional checks we should put
2015-12-06 17:07:50 +01:00
Nigel Barnes
5d004af6c9 bbc: preliminary support for FSD format. 2015-11-15 02:38:06 +00:00
Scott Stone
31cca9ea63 Added info header at the top of each .lua file (nw) 2015-11-14 12:51:21 -05:00
Miodrag Milanovic
0332334ecd move formats to proper place (nw) 2015-11-12 10:31:15 +01:00
Miodrag Milanovic
033227778e Remove not longer needed ForceCpp flag (nw) 2015-11-08 13:44:34 +01:00
Miodrag Milanovic
5deec43cbc update build scripts for rename c - > cpp (nw) 2015-11-08 13:26:29 +01:00
cracyc
c400248728 i8271: modernize [Carl] 2015-09-28 16:14:53 -05:00
Miodrag Milanovic
c9bde5341d reorganized scripts according to new structure (nw) 2015-09-13 10:17:58 +02:00
Michael Zapf
be6c3ee4c9 mfmhd: Introduced format definition, now generally available. 2015-08-02 15:50:22 +02:00
Dirk Best
08c7ed6ffb guab: Updated driver to use the standard wd floppy controller.
This also means that it now uses the software list system instead of
loading the floppy disk image into a memory region. To run the driver
use: "mame guab -flop guab3" now. You may also just start the driver,
then choose a floppy disk image from the builtin file manager.
2015-07-09 12:58:25 +02:00
Miodrag Milanovic
c5c718beb8 no need for subdir for these projects, those are same for all mame builds (nw) 2015-06-22 17:57:50 +02:00
Dirk Best
1c1860499f move some legacy formats over to imgtool since it's now the only user 2015-06-10 12:28:33 +02:00
Dirk Best
6ba157cb67 vtech1_dsk: remove, no longer used 2015-06-08 13:15:03 +02:00
Dirk Best
126f95c786 atarist_dsk: remove, no longer used 2015-06-08 11:24:49 +02:00