Commit Graph

39 Commits

Author SHA1 Message Date
GregWeil
93771fee59
plugins/hiscore: Fixed detection of software item lines, and added high score support for Mega Drive Sonic Spinball. (#11282) 2023-07-07 05:49:56 +10:00
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
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
07e55935cf plugins: Rewrote timer plugin fixing multiple issues.
Added emulated time recording as well as wall clock time.

Fixed recording time for multiple software items per system.  An
incorrect constraint on the database table meant that time was only
being recorded for a single software item per system.

Detect the "empty" driver so the time spent at the selection menu isn't
recorded (you'd get multiple entries for this due to the way options
leak when returning to the system selection menu).

Included schema migration code to update existing timer plugin
databases.  Also replaced some unnecessary floating point code with
integer maths, added log messages, and made the plugin unload unload its
database access code during emulation.

Changed other plugins' use of paths with trailing slashes as this causes
stat to fail on Windows.
2021-11-06 05:20:59 +11:00
Vas Crabb
d775a2731d plugins: Moved the timecode recording functionality to a plugin. 2021-11-02 15:31:03 +11:00
Vas Crabb
9753632492 -nes.xml: Added Latin title from box art for Yeongjaekeom Cocoma games.
-pluins/hiscore: Bumped version since storage location has changed.
2021-10-25 23:56:45 +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
5ab93130eb Plugin updates:
Changed the hiscore plugin to save inside the "hiscore" folder in the
plugin data directory.  The old hiscore path setting has already been
removed from MAME for some time.  This means the plugin was always
saving in the "hi" folder in the working directory with no way to change
it, which is problematic on Linux and macOS, particularly for distro
packagers.  There are lots of plugin and UI changes in this release, so
we may as well get this out of the way now.  Also made it possible to
change the "timed save" option from the Plugin Options menu, and save
that in the data folder, too.

Documented the input macro plugin.  The only undocumented plugins now
are the cheat plugin, the cheat finder plugin, and the port name plugin.
2021-10-24 09:38:03 +11: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
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
Vas Crabb
c39f46d6d2 Revert "added support for reading/writing hiscore files from cart images (#6130)"
This reverts commit a77313a987.

This seems to break high score support on things without cartridges.  I think it needs re-thinking.
2020-02-28 02:21:06 +11:00
eadmaster
a77313a987
added support for reading/writing hiscore files from cart images (#6130)
* added support for reading/writing hiscore files from cart images

example hiscore.dat entry:
````
nes,smb:
Super Mario Bros. (World).nes:
Super Mario Bros. (W) [!].nes:
@:maincpu,program,7df,4,0,0,ff
````

* store console hiscores in subdirs, added cart hashes support

* added back my prev changes

* added missing end

* using simpler regexpr for hiscore.ini parsing, fixed typo

* minor cleanups
2020-02-13 10:25:28 -05:00
Andrea
9764233875
made read_config in hiscore lua plugin more robust 2020-01-04 10:10:19 +01:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
cracyc
11c3b63c41 plugins/hiscore: use emu.time (nw) 2019-02-17 14:00:15 -06:00
cracyc
f1e51d745a plugins/hiscore: start delay (nw) 2019-02-17 13:16:33 -06:00
cracyc
fec83c922b plugins: handle the case where the ui prepends the list name to the list entry name (nw) 2018-05-02 09:37:34 -05:00
cracyc
031c9ca8fb plugins/hiscore: fix cpu tags and print detailed errors (nw) 2018-04-20 16:39:20 -05:00
cracyc
6cbf5c674b hiscore.dat: add handhelds that have high scores (nw) 2018-03-20 21:40:58 -05:00
cracyc
e766c5d5c7 plugins/hiscore: remove debug print (nw) 2017-12-17 15:03:46 -06:00
cracyc
ec2685c66c plugins/hiscore: add option to hiscore.ini to only_save_at_exit (nw) 2017-11-10 08:48:53 -06:00
cracyc
21b4a16edd plugins/hiscore: use videoram share for missile command scores so madsel isn't disturbed (nw) 2017-02-03 18:30:38 -06:00
Vas Crabb
f5356a62de srcclean on lua plugins, too 2016-08-30 15:53:27 +10:00
cracyc
4f25a90c75 hiscore: make path expansion work on win32 also (nw) 2016-08-04 16:49:11 -05:00
Roberto Benfatto
234628a88f Revert modifications of 0646ca8 2016-08-04 22:46:42 +02:00
Roberto Benfatto
4f83634380 Make hiscore path configurable by ini file 2016-08-04 20:27:16 +02:00
Roberto Benfatto
0646ca8b1a Fix .hi file load and write
hiscore.dat and hi folder path were not resolved as expected (their path was relative to mame executable, not to the plugin folder). Explicitly writing them as absolute paths gives the desired behavior.
2016-08-04 07:39:32 +02:00
cracyc
45de5e113e plugins/hiscore: add optional value to prefill for software that clears ram and add examples (nw) 2016-07-08 09:49:03 -05:00
cracyc
b49334e70a hiscore: fix segaxbd games and improve error (nw) 2016-05-29 10:26:47 -05:00
Miodrag Milanovic
fc48cb17f3 added print_verbose, print_info, print_debug and print_error to lua, and used it instead of print (nw) 2016-04-16 18:01:48 +02:00
cracyc
be431bd5a0 hiscore: checksum all the regions (nw) 2016-03-30 15:28:06 -05:00
cracyc
21390cd790 hiscore: only you can prevent namespace pollution (nw) 2016-03-29 07:47:04 -05:00
Miodrag Milanovic
699fa1462a Add ability for notifiers to add at front, fix for hiscore [Carl] 2016-03-29 08:15:17 +02:00
cracyc
5cfe38e481 hiscore: even if we can't save before a soft reset, at least load what we've got (nw) 2016-03-28 08:42:45 -05:00
cracyc
1e95b3b459 luaengine: add software name getter (nw)
hiscore: add support for softlist rom hiscores (nw)
2016-03-27 19:52:35 -05:00
Miodrag Milanovic
ef86ee6cec added hiscore plugin (disabled for now) (nw) 2016-03-22 16:19:15 +01:00