Commit Graph

102 Commits

Author SHA1 Message Date
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
85b9bcd670 plugins/cheat: fix regions in xml cheats too 2021-04-23 16:58:47 -05:00
Szunti
bf21508faa
Fix XML cheats which use multiple spaces. (#7998) 2021-04-23 16:56:21 -05:00
cracyc
6ac210c6be plugins/cheat: fix getting arbitrary screen 2021-04-04 09:58:51 -05:00
etabeta
8e72b65075 plugins/cheat: removed spurious print 2021-04-01 15:56:38 +02:00
Priuli
bcfd7c64b0 plugins/cheat: fix XML cheat loading when emulation is launched with an image option specified (e.g. mame nes -cart smb) or by loading directly one part of the software (e.g. mame a600 amigaocs_flop:lslarry2:flop1) 2021-04-01 15:33:39 +02:00
cracyc
a928d3c40c plugins/cheat: fix selection 2021-03-17 14:10:05 -05:00
cracyc
61caa1450b plugins: another leftover 2021-03-07 10:33:07 -06:00
cracyc
5b489ca475 plugins: fix missed lua api changes 2021-03-06 18:55:44 -06:00
Vas Crabb
525f744b38 plugins/cheat: Migrate remaining XML cheat code for Lua API changes. 2021-01-01 01:31:12 +11:00
Vas Crabb
a5e6f4ea8d Expose a couple more things to Lua so the plugins can show the actual key mapped to UI clear. 2020-12-27 04:27:42 +11: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
Vas Crabb
1df245cb99 More Lua engine clean-up and documentation, resulting in core cleanup.
More Lua interface cleanup, additional properties and methods, and
documentation migration/expansion.

Emulated switch inputs can have "not" codes applied to host input axis
directions.  It works the same way as host switch inputs - push twice
for a "not" prefix.

Input polling helpers no longer need to store state in the input device
items.  There’s less leakage, and less chance of things interfering with
each other.

Allow snapshot view options to be configured through the internal UI via
the video options menu.  Made video options menus place initial focus on
the currently selected view item.  Removed some crud from the menu base
class.

Fixed the description of the "snapview" option.  The value to get raw
screen pixels was changed to "native" a long time ago but the
description was never updated.

Re-arranged the Golden Poker button lamps so that the 6-button layouts
for Jolli Witch and Wild Witch make sense.  In 6-button mode, the hold
buttons double as bonus game and bet buttons, but the lamp outputs don't
change.  The simplest way to deal with this without requiring the user
to switch views or using layout scripting is to place the dedicated
buttons directly below the hold buttons that correspond to them.

Removed some software list data that was redundantly copied into
device_image_interface (m_supported was never even set, so it didn't
even work), and made crc() work better (previously it wasn't
recalculuated after unloading and loading another image).

Made strformat.h and devcb.h play nicer with C++17 and pre-standard
C++20.  Format precision now correctly limits the length of string
views.  Confirmed that strformat.{h,cpp} works with pre-standard C++20
support in GCC 9.

Removed an auto_alloc from cpu/arm7.
2020-12-18 15:54:52 +11:00
Vas Crabb
503332a986 -Lua cleanup and documentation migration checkpoint.
* Cleaned up some more of the Lua inteface.  Mostly replacing methods
  with properties, some consistency fixes, a few renames, some more
  exposed functionality, and a couple of properties that have no
  business being set from scripts made read-only.
* Moved a lot more Lua documentation out of source comments into the
  documentation, and expanded on it in the process.
* Got more UI code out of the input manager.
* Changed input sequence poller to a polymorphic class where you
  specify your intention upfront.
* Changed the cheat plugin to use UI Clear to clear hotkey assignments
  and leave them unchanged if the user starts assignment but doesn't
  press any switches.
* Ported AJR's fix for over-eager double-click recognition from SDL to
  Windows OSD.

-goldnpkr.cpp: Cleaned up inputs, using standard keyout and payout types
 and key assignments.
2020-12-16 02:18:52 +11:00
AJR
e70d4ebb34 plugins: Replace environment variable substitution function with core version 2020-12-08 09:44:32 -05:00
Vas Crabb
e008c7b1b1 -Lua engine cleanup, input edition:
* Modernised and cleaned up Lua bindings for input classes.
* Exposed the input_sequence_poller class to Lua and updated the
  autofire and cheat plugins to use it, rather than continuing to
  pretend it's part of the input manager.
* Exposed more of the natural keyboard manager, including the ability
  to enable/disable individual keyboard and keypad devices like you
  can from the keyboard mode menu.
* Exposed a few more things on ioport_port and input_device.

-plugins/cheat: Fixed menu item not updating visually when disabling a
 cheat with UI Left.

-plugins/cheatfind: Fixed not finding the first screen after screen
 enumerator was exposed as an object rather than using a table.

-bwidow.cpp, pacman.cpp: Minor cleanup to recent changes.
2020-12-09 01:10:26 +11:00
Vas Crabb
6e807013c5 Disable SOUND_DEBUG for non-debug builds, and srcclean 2020-09-27 11:00:56 +10:00
npwoods
b8d6be3320
Fixing a cheat plugin bug 2020-09-19 11:02:29 -05:00
cracyc
cfd3c1fac6 plugins/cheat: small simplification 2020-09-15 20:38:39 -05:00
cracyc
90fd79601b
plugins/cheat: copy the cheat table to not expose internal state (#7238) 2020-09-15 09:37:47 -05:00
cracyc
692ff2c06f plugin/cheat: subtract min before dividing 2020-09-13 19:13:38 -05:00
cracyc
35bfe62b59 plugin/cheat: check value is a mulitple of step 2020-09-13 19:03:22 -05:00
cracyc
c70bc6be75 plugin/cheat: flesh out the exported interface a bit more 2020-09-13 16:37:53 -05:00
cracyc
9c4d1457da plugins: add emu.plugin table to contain plugin exported interfaces 2020-09-13 10:00:54 -05:00
cracyc
a03b22c555 cheat_simple: with game genie codes try 32k nes banks then fall back to 8k and warn with 6 char codes and banked prg 2020-09-08 18:51:03 -05:00
Vas Crabb
a7fec751ed srcclean, manual adjustments (nw) 2020-01-26 12:39:27 +11:00
MooglyGuy
7486fe3ce0 -cheat_xml: Attempt at fixing Github issue #6114. Strip the leading colon from device names as necessary in order to avoid doubling of the root colon. [Ryan Holtz, DjDiabolik] 2020-01-04 14:06:13 +01:00
Vas Crabb
c38f63c10a plugins/cheat, plugins/autofire: only time out input sequence entry if nothing is entered (nw) 2019-11-22 02:32:29 +11:00
cracyc
52bc1df46e plugins/cheat: don't clear error message (nw) 2019-11-20 21:56:36 -06:00
cracyc
0606a77760 plugins/cheat: show pressed buttons when setting hotkeys (nw) 2019-11-20 21:35:35 -06:00
cracyc
2c485b158c plugins/cheat: add time functions to cheat sandbox 2019-09-09 20:56:39 -05:00
cracyc
9f12058484 plugins/cheat[find]: fix memshares (nw) 2018-08-27 20:43:33 -05: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
f5191c8605 plugins/cheat: oops (nw) 2018-05-02 08:57:20 -05:00
cracyc
6efb37250f plugins/cheat: translate debugger expressions by space index as the debugger does (nw)
pc9801: use correct video clock, fixes policenauts video speed (nw)
2018-05-02 08:42:56 -05:00
cracyc
2fff9bbd82 plugins/cheat: fix opcode space (nw) 2018-04-30 17:37:28 -05:00
cracyc
82446cd4cb plugins/cheat: work around small issue in conversion (nw) 2018-04-18 08:53:11 -05:00
cracyc
efe9644b5c plugin/cheat: use print_error to make testing easier (nw) 2018-03-05 09:22:44 -06:00
cracyc
b3f05b309d plugins/cheatfind: fix (nw) 2018-01-29 16:22:41 +11:00
Vas Crabb
4c29419cab srcclean (nw) 2017-10-22 12:34:30 +11:00
Vas Crabb
2851d7d6cd (nw) Improve localisation:
* Change makefile rules to treat mame.pot as a target so rules can depend on it
* Put mame.pot inside the build directory so it will get cleaned
* Couldn't get xgettext to scrape lua and C++ in the same command and still remove stale strings
* Use larger strings and format specifiers to fix some localisation issues
  - Issue with "None" lacking context in Russian and Turkish translations
  - Issue with "Not implemented" changing depending on the noun in Serbian
  - Issues with lua plugins not allowing for languages with different grammar/punctuation

Strings that need to be translated after this change - most of these are existing text that's been made into larger chunks or reworded slightly:

"Mechanical Machine\tYes\n"

"Mechanical Machine\tNo\n"

"Requires Artwork\tYes\n"

"Requires Artwork\tNo\n"

"Requires Clickable Artwork\tYes\n"

"Requires Clickable Artwork\tNo\n"

"Support Cocktail\tYes\n"

"Support Cocktail\tNo\n"

"Driver is BIOS\tYes\n"

"Driver is BIOS\tNo\n"

"Support Save\tYes\n"

"Support Save\tNo\n"

"Screen Orientation\tVertical\n"

"Screen Orientation\tHorizontal\n"

"Requires CHD\tYes\n"

"Requires CHD\tNo\n"

"ROM Audit Result\tOK\n"

"ROM Audit Result\tBAD\n"

"Samples Audit Result\tNone Needed\n"

"Samples Audit Result\tOK\n"

"Samples Audit Result\tBAD\n"

"ROM Audit Disabled\t\n"
"Samples Audit Disabled\t\n"

"Activated: %s = %s"

"Activated: %s"

"Enabled: %s"

"Disabled: %s"

"%s added"

"Default name is %s"

"Cheat written to %s and added to cheat.simple"

"Unable to write file\n"
"Ensure that cheatpath folder exists"
2017-10-03 10:49:30 +11:00
cracyc
633c37236e plugins/cheat: input sequence cheats [Carl] 2017-10-02 17:28:37 -05:00
cracyc
cf4c08014b plugins: gettextify localizable strings (nw) 2017-09-03 22:04:33 -05:00
cracyc
7e75ba4bfa luaengine: translation support [Carl] 2017-09-04 10:12:21 +10:00
cracyc
051a55b274 plugins/cheat: oops (nw) 2017-09-03 13:56:44 -05:00
Vas Crabb
ec3caa98bd srcclean (nw) 2017-08-27 11:07:21 +10:00
cracyc
83adc109e7 plugins/data: add marp scores [Carl] 2017-07-30 21:33:23 -05:00
cracyc
781a213378 plugins/gdbstub: WIP gdbstub plugins [Carl] 2017-07-26 21:23:42 -05:00
cracyc
f4c54655f2 plugins/cheat: make sure bp function is run only one per hit (nw) 2017-07-24 16:17:43 -05:00