Commit Graph

66 Commits

Author SHA1 Message Date
Vas Crabb
b67b969bf0 -Improved some Lua APIs:
* Moved several machine lifecycle callbacks to the notifier/subscriber
  model.  The old callback registration model is still available for
  them for now, but prints a deprecation warning.
* Added pre-save/post-load notifications.
* Use a single allocated timer rather than one anonymous timer per
  waiter.  Waiters no longer prevent saved states from being loaded.
* Clean up outstanding waiters on stop or state load rather than just
  leaking them.
* Started documenting parts of the emulator interface object that should
  be relatively stable.

-imagedev/avivideo.cpp: Fixed an object leak on unload.  Also changed
 some other media image devices to use smart pointers.
2023-04-07 06:20:40 +10:00
Vas Crabb
ab6a4f1b94 plugins/data: Use local sqlite3 library variable. 2023-03-13 05:51:22 +11:00
npwoods
13910382a5
osd/modules/file: Don't magically substitute environment variables when opening files. (#9859)
* util/options.cpp: Added option types for single and multiple paths.
* util/options.cpp: Substitute environment variables in values from defaults and INI files.
* ui/dirmenu.cpp: Removed hard-coded list of multi-path options.
* plugins: Don't substitute environment variables in path options.
2022-12-17 06:03:59 +11:00
Vas Crabb
df65b00ed4 plugins/data: Fixed story.dat errors; virtual.flt: Use glob pattern. 2022-07-02 03:11:23 +10:00
Vas Crabb
923ef2c25d -plugins.data: Reworked the code substantialy.
* Use the plugin data folder for storing the cache.  The history folder
  may be read-only or shared with different configurations.
* Don't create the cache database or surrounding folder if there's
  nothing to store in it.
* Actually use prepared queries multiple times rather than always
  destroying them after a single use.
* Added proper error checking for most database operations.
* Improved query performance by avoiding outer joins and table scans.

-bus/nubus: Made the Macintosh Display Cards map the blue channel to
 white with monochrome monitors.  Also added logging for PLL
 configuration to help debug how CRTC and RAMDAC clocks work in the
 future.
2022-06-25 04:57:24 +10:00
Vas Crabb
742de90a65 Mac-related emulation fixes:
* bus/nubus: Started emulating SuperMac Spectrum/8 CRTC.
* bus/nubus: Respect Apple 4•8 screen base register.
* cpu/m68000: Fixed disassembly of bit field extract instructions.
* Also cleaned up data plugin a little.
2022-06-20 07:52:24 +10:00
Vas Crabb
d775a2731d plugins: Moved the timecode recording functionality to a plugin. 2021-11-02 15:31:03 +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
27599c115e plugins/data: srcclean 2021-10-25 17:02:37 +11:00
cracyc
f16565a556 plugin/data: handle multiple blocks in dat 2021-10-25 16:55:40 +11:00
Vas Crabb
4601e60391 plugins: Use SPDX short identifiers for licenses in exports (more precise and easier to localise), use CC0 for hiscore plugin rather than CC0. 2021-10-25 01:57:07 +11:00
Vas Crabb
669b1f6ade -docs: Started documenting plugins.
* Also added a couple of missing command-line options, and added a local
  table of contents to the (rather long) command line options page.

-Added a separate CI target for localisation updates that produces an
 artefact, and removed the message catalogs from the trigger paths for
 the Linux CI build.
2021-10-24 05:48:05 +11:00
Julian Sikorski
97bd2d20df
Strip CRs from history.xml (#8115) 2021-05-30 13:25:37 -05:00
Vas Crabb
fab84e8d2b Mostly revert "Create console history file in homepath (#8026)"
The change to make the console plugin work is preserved.

This reverts commit 25137717c9.
2021-05-07 02:14:05 +10:00
Szunti
25137717c9
Create console history file in homepath (#8026)
* Fix console history path, homepath is a core option

* Create missing directories recursively in lua plugins.

* Add lfs to global environment in a less magical way.

require normally doesn't bind the name globally just returns the
module, mame sets a preloader that does bind lfs globally, but
maybe it's less surprising to do it explicitly
2021-05-03 20:40:10 -04:00
cracyc
9c14a66139 plugins/data: properly clear history data when loading new file 2021-04-03 20:13:56 -05:00
Vas Crabb
78f6ff34a5 srcclean in preparation for branching release 2021-01-24 13:33:07 +11:00
cracyc
ae2e3443f5 plugins/data: more hiscore improvements 2021-01-02 22:39:40 -06:00
cracyc
aea4460250 plugins/data: better hiscore parsing 2021-01-01 22:06:33 -06:00
cracyc
d961efa925 plugins/data: remove logging and fix query 2020-12-31 21:47:50 -06:00
cracyc
886bf9ac67 plugins/data: use history.xml and add xml parser for it 2020-12-31 15:06:57 -06:00
Vas Crabb
9e36b6a6d9 More Lua interface cleanup - it's simpler with cleaner underlyng APIs.
Made the sound manager mute controls readable, and got rid of system
enable since it just controls system mute anyway.  This was causing
confusion: phantom2 was trying to use both independentlyt casuing the
mute bit to be ignored.

THe Lua interface changes are mostly changing methods to properties,
some renames to make things clearer, and some additional properties for
better control over snapshots.
2020-12-27 01:32:37 +11:00
AJR
e70d4ebb34 plugins: Replace environment variable substitution function with core version 2020-12-08 09:44:32 -05:00
cracyc
c6dcf7e6be hiscore.dat: Updates [Leezer]
plugins/data: various fixes (nw)
2019-12-02 21:17:42 -06:00
cracyc
b32f90e5a9 plugins/data: small cleanups (nw) 2019-11-29 10:18:50 -06:00
cracyc
b5f648cca7 plugins/data: that shouldn't be there (nw) 2019-11-29 08:36:30 -06:00
cracyc
8dbea98e20 plugins/data: loading fixes (nw) 2019-11-28 22:35:36 -06:00
Vas Crabb
ac79c90607 srcclean (nw) 2018-04-22 09:24:13 +10:00
cracyc
71f9ff71d1 plugins/data: require returns true if package returns nil (nw) 2018-03-29 15:00:47 -05:00
cracyc
31be84ea40 plugins/data: give up if the database can't be created (nw) 2018-03-20 21:54:22 -05:00
cracyc
6072f32c4a oops2 (nw) 2018-01-15 21:30:59 -06:00
cracyc
cc7ccbd9b5 plugins/data: fix version for gameinit (nw) 2018-01-15 09:09:13 -06:00
firewave
8420d338a7 plugins/data: added database checks to data_marp.lua as well (nw) 2018-01-15 15:15:11 +11:00
cracyc
9ef46e266d plugins/data: didn't mean to undo that (nw) 2018-01-14 14:22:05 -06:00
cracyc
380bff2202 plugins/data: don't pollute the namespace and use emu.print_error (nw) 2018-01-14 08:39:37 -06:00
firewave
7da4d2dfc6 plugins/data: added reporting of database errors (nw) 2018-01-14 12:09:06 +01:00
Oliver Stöneberg
f911ab2869 plugins/data: fixed table lookup (nw) 2018-01-13 19:37:04 -06:00
cracyc
e94b4d2bac plugins/data: fix spelling (nw) 2018-01-12 16:27:14 -06:00
cracyc
da0c536130 fmtowns_cd: hand fix rbisland (nw)
load_dat.lua: fix crlf issue (nw)
selsoft: fix off-by-one crash (nw)
2017-12-20 21:16:32 -06:00
cracyc
89a97d353c data_marp: bail if database not open (nw) 2017-09-27 16:01:36 -05:00
cracyc
cf4c08014b plugins: gettextify localizable strings (nw) 2017-09-03 22:04:33 -05:00
Vas Crabb
ec3caa98bd srcclean (nw) 2017-08-27 11:07:21 +10:00
Vas Crabb
0a6f98cd7d font_osx: handle fonts where space glyphs return a null bounding box (e.g. Hiragino family)
restore ability to localise info box headings
2017-08-06 12:04:54 +10:00
cracyc
83adc109e7 plugins/data: add marp scores [Carl] 2017-07-30 21:33:23 -05:00
cracyc
97a4f94d17 plugins/data: fix small things (nw) 2017-07-27 22:14:09 -05:00
cracyc
8408a79059 plugins/data: use 2 column format and clean up some parse errors (nw) 2017-07-27 17:29:22 -05:00
Vas Crabb
8f15315a52 srcclean (nw) 2017-02-19 11:40:55 +11:00
cracyc
777947797f plugins/data/data_hiscore: print_verbose unimplemented stuff (nw) 2017-02-17 21:34:31 -06:00
cracyc
182fc20c15 plugins/data/data_hiscore: don't permit hi score parse scripts to modify the shared environment or save any persistent data (nw) 2017-02-17 16:04:04 -06:00
cracyc
eed65a01ac plugins/data: create first dir in historypath if it doesn't exist (nw) 2017-02-16 21:50:57 -06:00