Commit Graph

13294 Commits

Author SHA1 Message Date
Ivan Vangelista
7b9bc3a46a debughlp.cpp: document dumpo command (nw) 2018-04-20 18:20:24 +02:00
Olivier Galibert
d7f5f63ce8 maps: Finish mame/audio and the lone dummy (nw) 2018-04-20 11:26:34 +02:00
AJR
a00279961a Remove set_digit_value and deprecate set_lamp_value and set_led_value for the same reasons (nw) 2018-04-13 16:01:52 -04:00
AJR
3d3785864e emupal.h: Remove underscores from template parameter names (nw) 2018-04-13 14:13:55 -04:00
smf-
1a27a251f8 remove safe_pc() and safe_pcbase() (nw) 2018-04-13 16:41:37 +01:00
cracyc
88bcdb4a50 pc9801_86: add clocks (nw) 2018-04-13 09:48:53 -05:00
AJR
daec5f3639 Relax constraints on address mirroring/global mask combinations. Mirror bits are now allowed to fall outside the driver-specified global mask, though memory map validation requires that they cover the entire masked-out portions of the address space if any do.
This change is intended to expedite debugging of software written for the TMPZ84C015 or similar Z80-based controllers which use 8-bit I/O addressing for the on-chip peripherals but may use either 8-bit or 16-bit addressing externally.
2018-04-11 10:04:31 -04:00
AJR
c92693983d diexec: Note flaw in INPUT_LINE_RESET implementation (nw) 2018-04-08 19:06:55 -04:00
smf-
8ebd748b1b Fix fencepost in memory_manager::region_containing, which caused regions to be registered for state saving. [smf] 2018-04-07 08:55:53 +01:00
Olivier Galibert
12b5454a27 Now that was a subtle one... (nw) 2018-04-05 15:58:14 +02:00
smf-
5336bb02b6 Standardise on IPT_CUSTOM for hooking up custom code in PORT_BIT, leaving IPT_SPECIAL for the UI. [smf] 2018-04-03 11:58:48 +01:00
GavinAndrews
06a09d3821 Added suspend and resume debugger commands (#3411) 2018-04-02 12:23:38 -04:00
Vas Crabb
2c340f490e move some not-directly-emulation-related helpers to lib/util, further extricate emu.h from tools (nw) 2018-04-01 19:10:26 +10:00
Vas Crabb
e019bf481f cleaner handling of layout parsing errors (nw) 2018-03-29 15:29:08 +11:00
Vas Crabb
a074296288 fix scheduling session events from debugger (nw) 2018-03-29 01:42:37 +11:00
Vas Crabb
010155a3c5 Reshuffle some stuff:
* Move around the debugger hooks to get a small but measurable performance increase
* Remove emucore from external tools
* Improve performance of DSP16 interpreter a little by generating six variants of execution loop
2018-03-28 05:25:15 +11:00
Julian Sikorski
9a154947d1 Added possibility of building using system pugixml 2018-03-27 10:19:22 +11:00
Vas Crabb
fdf806a5ac check for error before reporting it (nw) 2018-03-26 20:22:52 +11:00
Vas Crabb
503be5cbdb Allow machine configuration to specify BIOS easily, move default BIOS selection into device configuration complete 2018-03-26 19:53:18 +11:00
AJR
35f5bbb08e cdc721: Start adding devices and handlers (nw) 2018-03-25 08:40:18 -04:00
Vas Crabb
2e40673d6d Merge branch 'master' of https://github.com/mamedev/mame 2018-03-25 04:51:28 +11:00
Vas Crabb
d4dcc2470d don't sleepcode - for some reason this only upset GCC, not clang (nw) 2018-03-25 04:49:17 +11:00
hap
7c29cd0019 dirom.cpp: add missing license header (nw) 2018-03-24 18:45:06 +01:00
Vas Crabb
1c3684787c get rid of dioutput - it's only used in one place, and it upset GCC on Linux debug builds for some reason 2018-03-25 04:31:07 +11:00
Vas Crabb
08dde5eb0a srcclean and regenerate localisations (nw) 2018-03-25 02:03:24 +11:00
Vas Crabb
8142f24c43 don't pass so many naked pointers around (nw) 2018-03-25 01:44:45 +11:00
cam900
6924f3cdc1 gstream : Add precalculated RGB Palette for X2222 drawing gfxs, Cleanup duplicates (#3370)
* gstream : Convert bitmap into bitmap_ind16, Cleanup duplicates

* gstream.cpp : Fix compile

* gstream.cpp : Revert "convert bitmap into ind16", Add precalculated rgb data for X2222 draw gfxs

* gstream.cpp : Build fixes

* gstream.cpp : More build fixes

* gstream.cpp : Remove unneeded arguments of drawgfx_transpen_x2222
2018-03-24 08:39:17 -04:00
AJR
dbe56e3113 Include option and file names in fatal error message for failure to load image 2018-03-22 17:38:01 -04:00
AJR
9eb8c177bb vgmplay: Disable POKEY and QSound devices if not required 2018-03-22 17:14:28 -04:00
AJR
358e6b23be Eliminate vestigial member that was behind machine().first_screen() (nw) 2018-03-21 14:16:30 -04:00
Ariane Fugmann
c32176f2bb M1COMM, M2COMM, S32COMM: Updates to simulation (#3369)
* M1COMM: update simulation based on real firmware (nw)

- read partial frames correctly now
- added VSYNC packets (framesync currently disabled as this can cause
MAME to freeze and we have no way to tell if the socket is still open)

* M2COMM: update simulation (nw)

- read partial frames correctly now
- added VSYNC packets (framesync currently disabled as this can cause
MAME to freeze and we have no way to tell if the socket is still open)

* M1COMM, M2COMM: add config option to sync frames over network (nw)

* M2COMM: another update to the simulation.

- added relay mode (used by stcc)
- added "connection loss"

* M1COMM: update to simulation (nw)

- better sync
- detect lost connection

* M2COMM: use osd_file rather than emu_file for better control (nw)

* M2COMM: handle connection loss in a a more elegant way (nw)

* M1COMM: use osd_file rather than emu_file for better control (nw)

* S32COMM: updated simulation (nw)

- handle connection loss
- use osd_file rather than emu_file for better control
2018-03-21 13:34:39 -04:00
smf-
0883f01e66 validity check: test all 32 results from count_leading_zeros() & count_leading_ones() [smf] 2018-03-21 16:49:27 +00:00
Vas Crabb
ffd19cda0f Restrict ROM labels to a filesystem- and shell-safe subset of printable
ASCII.

This has not been done unilaterally - I have the support of @galibert,
@Tafoid, and @rb6502 to do something about the current free-for-all.

The trouble with the ROM label field in MAME is that it serves multiple
competing purposes: it's supposed to identify the device in the original
system, and also act as a filename when searching for media image files
to load.  It also has to appear in listings of needed/missing files
(e.g. in cases where the image _isn't_ found).

To identify the original device, the ROM label field in MAME often
contains text derived from some combination of one or more of the text
on a label if present, the silkscreen on an IC package, the location on
the circuit board, and the device designation.  There's no standard for
the order in which these appear and how they're separated.  Some people
add arbitrary filename extensions and other annotations.

There are practical limitations on what can appear in the string, given
it's used as a filename:
* Path/name length limits.
* Restrictions on characters that can appear in a filename.
* Practicality of using the filename in a command-line environment.
* Ambiguity when describing a filename.

Filesystems themselves typically restrict characters in filenames:
* Windows defines MAX_PATH as 260 characters - longer paths are
  difficult to use with Win32 APIs and don't work properly in Windows
  Explorer
* Most filesystems don't allow ^@ or the path separator in names.
* Windows doesn't allow C0 control characters or <>:"/\|?* characters in
  filenames.
* Filesystems may have collation, e.g. FAT16 is case-folding, NTFS and
  HFS+ are case-preserving but case-insensitive, while EXT and XFS are
  case-sensitive.
* Filesystems may perform Unicode normalisation, e.g. NTFS forces NFC,
  HFS+ forces NFD, while ZFS stores filenames as supplied at creation,
  but may be configured to apply normalisation when testing equality.

Shells use various ASCII characters for special purposes:
* C0 control characters for line editing and control (e.g. ^C to cancel
  a line, ^V for control charecter escape, ^R for history search).
* The "'\ chracaters for quoting/escaping.
* The ><| characters for redirection.
* The *?[] characters for pattern matching.
* The ${}~ characters for variable substitution/sequence expansion.
* The ! or ^ characters for history substitution.
* The ()` characters for controlling subshells.
* The %& characters for job control.
* The ; character as a command separator.
* The # character for comments.

There's also the issue of whether users across a range of locales will
be able to type/display characters.  We still don't have good support
for Unicode console output on Windows (std::wcout doesn't seem to work
properly), many users don't install C/J/K fonts, and many users aren't
comfortable entering text in unfamiliar languages.  This means we're
limited to printable ASCII for practical purposes.

The practical limitations mean the subset of "safe" characters is
limited to ASCII digits, either uppercase or lowercase English Latin
(but not both due to collation behaving differently across systems), and
the +,-.=_ punctuation chracters.  We've decided on lowercase, digits,
and safe punctuation.  In addition to this, spaces are allowed, as they
can be quoted/escaped easily enough if no other special characters are
used.

There have been some arguments that allowing uppercase is "more
accurate", but in practical terms it doesn't add much value.  A string
in a C++ program can't represent layout, relative size of text, colour
and shape of the label, text font, graphics, and many other details.  It
also does nothing to address labels with text outside the English Latin
alphabet (e.g. labels with Chinese ideographs).  Besides missing
information, the lack of hard and fast rules means you need to intuit
what a label string in MAME is trying to represent.  There is simply no
substitute for photographs.  There wasn't even any consistency in case
within individual machine sets.  For example, several games in
vigilant.cpp had inconsistent case for "ic" vs "IC" in designation
suffixes, and ibm6850.cpp had inconsistent case for filename extensions
withing a set.  There were sets that used uppercase for text from the
label but not from the part number/PCB location, and vice versa.  It was
a huge mess.

There's some merit to the idea of allowing a wider variety of characters
in the label strings in the source, and mapping to a more restricted set
when searching for files.  However it creates more issues than it
solves.  It would require a change to the XML output to provide both the
label and filename, and a corresponding change to external ROM
management tools.  It would be impractical to do for software lists,
because it would require ROM management tools to implement the exact
same mapping algorithm as MAME.

But that aside, actually doing useful mapping would be impractical.
What would you do with C/J/K ideographs, like the chip labelled
東方不敗 (Dongfang Bubai)?  There's no intuitive way to do the mapping
wtihout incluing something like Unihan data, which would add a lot of
bloat.  Even the, without a language hint the Romanisation would be less
than ideal in many cases (using Chinese reading for Japanese text and
vice versa).  There's still the messy issue of filesystem collation to
deal with.

We do allow full Unicode in comments in the source.  If you want to
provide a more detailed description of a ROM label, that's the place for
it.  You've got more characters available, and the possibility of using
mulitple lines.  There are too many other competing requirements on the
label field in the ROM definitions.
2018-03-18 06:34:43 +11:00
AJR
b6d5d656c7 New machines marked as NOT_WORKING
----------------------------------
CIT-101 [Doug Crawford]
2018-03-15 17:56:27 -04:00
Vas Crabb
0bf88bda8f Cycle-accurate DSP16 core (disabled in QSound for performance reasons) 2018-03-15 19:02:43 +11:00
Olivier Galibert
efacbf5f4c Some corners of C/C++ are just a pain (nw) 2018-03-14 20:48:30 +01:00
Olivier Galibert
a13478f416 addrmap: Fix subtle bug with nonsubtle effects, also ensure initialization (nw) 2018-03-14 19:56:26 +01:00
Olivier Galibert
115bb9936c Address maps macros removal, pass 1 [O. Galibert] 2018-03-14 14:07:14 +01:00
Olivier Galibert
f155992daa Rename some memory stuff (nw) 2018-03-14 14:05:49 +01:00
AJR
25b40bae22 Fix masking of offset expressions in debug view of address-shifted spaces (nw) 2018-03-12 15:47:46 -04:00
AJR
69ea9be761 trs80.cpp: Derive almost all clocks from actual XTALs, including screen raw parameters
- UART modernization (nw)
2018-03-12 10:37:25 -04:00
Vas Crabb
af31f4b3de better handling for arbitrary numbers of screens (nw) 2018-03-12 17:31:40 +11:00
AJR
58491dec69 Better fix for find command (nw) 2018-03-12 00:15:03 -04:00
AJR
a4f5e6a842 Fix debugger find command for address-shifted spaces 2018-03-12 00:07:33 -04:00
AJR
41a6e6222e Fix watchpoint view for address-shifted spaces 2018-03-11 23:52:59 -04:00
mooglyguy
67627369dd Address performance concerns with previous change to screen.h/.cpp, nw 2018-03-11 21:26:31 +01:00
AJR
2f13e9b319 Fix output of wplist debug command for address-shifted spaces 2018-03-11 15:36:20 -04:00
AJR
7f934429fa Fix extent of debug view of address-shifted memory spaces 2018-03-11 15:23:35 -04:00
Ted Green
10bca50668 rgbsse: Fix scaling functions for negative values. Fixes graphical anomalies in warfa. 2018-03-11 12:36:59 -06:00
Ryan Holtz
9a777099a5 Remove first_screen(), nw 2018-03-11 14:56:54 +01:00
Ryan Holtz
81a35fb46e Remove all uses of first_screen() from core files, nw 2018-03-11 11:17:16 +01:00
mooglyguy
06c75d0a08 Remove commented code, nw 2018-03-10 20:01:15 +01:00
mooglyguy
25c4b8d777 Remove first_screen() accessor from machine_config now that it is not used, nw 2018-03-10 20:01:15 +01:00
Nigel Barnes
35a3cc25ea xtal: Added 80_MHz_XTAL for ARM710 (nw) 2018-03-06 16:17:20 +00:00
AJR
4a3622950d Fix tilemap device (nw) 2018-03-06 00:57:03 -05:00
Vas Crabb
7f78b5975a get rid of the last set_indexed_value in drivers/devices - this ends up a bit ugly to maintain backwards compatibility with layouts/web UI (nw) 2018-03-05 17:51:26 +11:00
AJR
7ede8f952d Unbreak MCFG_PALETTE_INDIRECT_ENTRIES (nw) 2018-03-04 13:59:25 -05:00
wilbertpol
3b923d59cc destaticify initializations (nw) (#3289)
* destaticify initializations (nw)

* fix this->set_screen (nw)
2018-03-04 04:18:08 +11:00
Vas Crabb
6569affe94 deprecate first_screen - there's been plenty of warning
also more string hash reduction (nw)
2018-03-04 03:37:30 +11:00
Vas Crabb
205a65e3a8 fix end()/cend() on output_finder (nw) 2018-03-04 01:26:08 +11:00
Vas Crabb
e068541f5e start getting brutal on output.h (nw) 2018-03-02 00:14:28 +11:00
R. Belmont
5ffc8a79a4
Merge pull request #3266 from JoakimLarsson/diablo_1
WIP: Diablo printer CPU
2018-02-28 14:03:10 -05:00
Vas Crabb
910d2267ca Start squeezing out the poor-performing parts of the output_manager:
* Turn deprecated declataion warnings on by default and make them non-fatal
* Make output_finder iterable in algorithms and range-based for loops
* Replace a lot of set_something with output_finder
2018-02-28 21:19:37 +11:00
Vas Crabb
8dad4881f6 srcclean (nw) 2018-02-25 01:34:04 +11:00
Olivier Galibert
c5345b9ea8 Grammar police (nw) 2018-02-24 14:09:46 +01:00
joakim
35a7f3e628 WIP: Diablo printer CPU 2018-02-24 02:32:36 +01:00
Vas Crabb
836c43f630 untangle ladybug and redclash state classes 2018-02-24 01:00:58 +11:00
smf-
494e9b4c81 Debugger: fix f10 step over of instructions with a branch delay slot [smf] 2018-02-21 16:02:37 +00:00
AJR
f8dec81588 devcb: Really fix mistake (nw) 2018-02-20 19:46:27 -05:00
AJR
819199e179 devcb: Fix mistake (nw) 2018-02-20 19:44:46 -05:00
AJR
9545f58030 devcb: Fix validation problem with chained callbacks (nw) 2018-02-20 19:30:29 -05:00
AJR
12cf6b64eb Register device callbacks and add some basic validation for them 2018-02-20 14:13:20 -05:00
Vas Crabb
8b1bc128e5 backport lots of cleanup from WIP branch (nw) 2018-02-19 20:34:33 +11:00
AJR
c12f2ee58d Set up heavily mirrored memory ranges with subunit masks (e.g. orunners) much more efficiently 2018-02-15 22:04:17 -05:00
ajrhacker
5386ad7284 Generalized support for byte-smeared accesses (nw) (#3207)
The new cswidth address map constructor method overrides the masking normally performed on narrow-width accesses. This entailed a lot of reconfiguration to make the shifting and masking of subunits independent operations. There is unlikely to have any significant performance impact on drivers that don't frequently reconfigure their memory handlers.
2018-02-15 06:43:57 +01:00
Vas Crabb
f4df51e522 (nw) screw you macros and the horse you rode in on
There's no voodoo involved in derived machine configurations and
fragments any more.  The macros were just obfuscating things at this
point.
2018-02-14 23:46:17 +11:00
Olivier Galibert
5f215ff7d4 Fixes (nw) 2018-02-13 10:55:23 +01:00
Olivier Galibert
bc909f20e8 emumem: Fix extra-large device map (nw) 2018-02-12 15:04:41 +01:00
Olivier Galibert
c521964316 API change: Memory maps are now methods of the owner class [O. Galibert]
Also, a lot more freedom happened, that's going to be more visible
soon.
2018-02-12 10:04:52 +01:00
Julian Sikorski
8cc758355d Enable use of system-wide asio, glm and rapidjson (#3172)
* Fixed building using system utf8proc

* Fixed building using system portaudio

* Allow using system-wide asio headers (1.11.0 or higher required).

* Allow using system-wide glm headers

* Allow using system-wide rapidjson headers
2018-02-08 16:06:25 -05:00
Olivier Galibert
870695380c Head, meet desk (nw) 2018-02-07 16:53:06 +01:00
Olivier Galibert
2b13112e7a Renju fix, that one was a nightmare (nw) 2018-02-07 11:52:39 +01:00
AJR
a3f0273748 Fix ASCII dump output for big-endian spaces 2018-02-07 00:34:57 -05:00
Firehawke
b2e11d00e0 More docs work: escapes, debugger update (nw) (#3168)
* Missed a couple escape sequences. (nw)

* A little more escaping, acronym fixes, fix oddity in symlist (nw)

* Update debugger internal help to match docs (nw)

* Lowercasing for CPU in command parameters, fix casing on ASCII. (nw)
2018-02-05 20:27:02 +11:00
AJR
3f135a40b7 Flip screen API cleanup (nw)
- Make the global flipping functions of driver_device protected so as not to be accessible from within subdevices
- Eliminate the flip_screen_set_no_update kludge
2018-02-03 21:02:18 -05:00
AJR
fe500377ad address_map: Internal maps must now be constructed last to have priority (nw)
This fixes sound in mpatrol.
2018-02-01 20:06:15 -05:00
Olivier Galibert
127cd08d4d API change: Memory maps are now "last entry wins" [O. Galibert]
This allows for the much more natural "import another map and patch
it" structure, or "cover a whole region then punch holes in it".  Our
previous first-entry-wins rule was always a surprise to newcomers, and
oldcomers too.
2018-01-31 22:03:00 +01:00
Olivier Galibert
648e2a536a *DUH*, also fix MT6857 (nw) 2018-01-28 14:15:28 +01:00
Vas Crabb
4e8bb7c7e5 srcclean and regenerate localisations (nw) 2018-01-28 14:25:52 +11:00
hap
add0c3b9e7 search-replace .0_?Hz_XTAL to _?Hz_XTAL (nw) 2018-01-26 15:37:44 +01:00
AJR
0182f6150c A farewell to machine_config_constructor (nw) 2018-01-26 03:45:44 -05:00
Vas Crabb
1c92473f25 let's be dimensionally correct 2018-01-26 18:02:29 +11:00
Vas Crabb
a9a9c45871 less reliant on PCH, more constexpr, allow 16_MHz_XTAL without decimal point (nw) 2018-01-26 17:43:44 +11:00
hap
8a9124a885 xtal: add x_yHz_XTAL list you can copy-paste from (nw) 2018-01-25 16:09:12 +01:00
David Haywood
c3709b0558 various reorganization of radica and vtech stuff (#3108)
* various reorganization of radica and vtech stuff

* missed this (nw)

* correct file (nw)

* newlines and stuff (nw)

* less c_str (nw)

* worse (IMHO) filenames (nw)

* format got messed up (nw)

* some bits for golden tee (nw)

* get us renderng something in rad_gtg (nw)

* some basic inputs (nw)

* further improvements to the Golden Tee Home Edition (radica eu3a14)

added Radica Sensible Soccer [Sean Riddle]

* tilebase handling (nw)

* golden tee home video improvements (nw)
2018-01-24 22:00:14 -05:00
Vas Crabb
fcdefcd4a4 bad Sarayan (nw) 2018-01-25 10:28:46 +11:00
Vas Crabb
7168abee36 do you user-defined literal? also some more notes on the digital scale (nw) 2018-01-24 00:51:23 +11:00
Olivier Galibert
30add0e064 Fuck, I missed the last commit (nw) 2018-01-23 14:02:27 +01:00
Olivier Galibert
03ba80e0ef xtal.h is dead, long live to xtal.cpp [O. Galibert] 2018-01-23 10:25:25 +01:00
AJR
9283710bf8 Add VT3xx XTALS (and fix one misread value) (nw) 2018-01-19 11:23:00 -05:00
AJR
4596f8a28b Once more into the xtal.h breach (nw) 2018-01-19 09:57:17 -05:00
Olivier Galibert
d0715c830d memory: Deambiguate handlers, also a hint of things to come (nw) 2018-01-19 08:23:19 +01:00
Vas Crabb
a0dfee78d6 std::function and delegate both require runtime relocations, slowing down startup - just use function pointers; also, most downcast, and get rid of a circular dependency between gamedrv.h and mconfig.h (nw) 2018-01-18 18:56:01 +11:00
AJR
92aca7daad Warning: implicit private inheritance may be hazardous to your build (nw) 2018-01-17 11:37:58 -05:00
AJR
d1b698af36 std::function is too inefficient, use a device delegate instead (nw) 2018-01-17 11:25:34 -05:00
Olivier Galibert
d469cc04bc API Change: Machine configs are now a method of the owner class, and the prototype is simplified [O. Galibert]
Beware, the device context does not follow in MCFG_FRAGMENT_ADD
anymore due to the prototype change.  So creating a device then
configuring through a fragment doesn't work as-is.  The simplest
solution is just to add a MCFG_DEVICE_MODIFY at the start of the
fragment with the correct tag.
2018-01-17 16:11:18 +01:00
AJR
91ea7b5174 microterm.cpp: Screen configuration (nw) (touches xtal.h, alas) 2018-01-17 00:49:44 -05:00
Vas Crabb
ba5715596a This causes huge changes in behaviour that can't be hand-waved away.
Revert "Removal of voltage_regulator_device (nw)"

This reverts commit 1af133752a.

Revert "New way to provide DAC reference inputs (nw)"

This reverts commit 1c6a7ab40c.
2018-01-13 02:06:27 +11:00
AJR
b3aba982da qvt103: Give this its own driver (touches xtal.h, sorry) (nw) 2018-01-11 23:28:31 -05:00
AJR
f8adca0dd0 Fix masking of signed integer types in debug state 2018-01-10 18:00:10 -05:00
AJR
1c6a7ab40c New way to provide DAC reference inputs (nw)
- Introduce MCFG_SOUND_REFERENCE_INPUT to provide fixed inputs through the resampler, eliminating the need for the "voltage regulator" device
- Replace memset use in sound.cpp with std::fill

This was my third implementation of this concept. The previous two involved attaching sound streams to the dummy device (which required giving it device_sound_interface and other modifications).
2018-01-10 02:11:14 -05:00
phulshof
1aaed4a64e Override and fallback options for artwork (#2908)
* Added fallback_artwork and override_artwork as MAME options to allow default artwork to be loaded.

* Removed debug testing code.

* - Allow loading of built-in layouts even if override_artwork is specified.
- Allow loading of fallback_artwork if only default view have been found.
- Fixed order of built-in layouts with regards to fallback_artwork as agreed upon the forums.

* Changed |= true to = true, and changed override artwork so it only checks for default.lay if the <machine name>.lay is not found.
2018-01-07 15:51:02 +11:00
Oliver Stöneberg
eab5e7e116 debugcpu.cpp: added missing initialization of m_vblank_occurred (nw) 2018-01-06 20:50:29 +11:00
AJR
30c9c6fcd2 debugcpu.cpp: Eliminate unnecessary downcast (nw) 2018-01-05 15:22:42 -05:00
Vas Crabb
0f413001dc binding reference to nullptr is bad, mkay? (nw) 2018-01-06 02:53:31 +11:00
AJR
aa45e908bb Privatize m_screen and other variables of device_video_interface (nw) 2018-01-05 10:47:28 -05:00
AJR
2f9ea2b4e1 Eliminate machine().firstcpu (nw) 2018-01-04 23:00:26 -05:00
AJR
c1aa6cfb63 xtal.h: Add another large batch of terminal XTALs (nw)
- c65: Remove provisional XTAL definition as requested
- vt240: Correct some clocks and add MCFG_SCREEN_RAW_PARAMS
- tv950: Configure keyboard MCU (not hooked up yet)
- wy55: Release year guessed from ad
2018-01-03 11:25:07 -05:00
smf-
25efd8f81c simplify nodump chd check (nw) 2018-01-03 09:56:27 +00:00
Ivan Vangelista
30ae0cd187
soflist.cpp: fixed nodump disk validation regression (nw) 2018-01-03 08:58:17 +01:00
AJR
56793ba89d xtal.h: Another batch of additions (nw) 2017-12-28 20:32:31 -05:00
Firehawke
6cde1460c7 Add verbose logging for CFG files (#2980)
* Basic anchor links for FAQ page

* Add verbose logging for CFG files

We already have verbose logging for INI files that get parsed, so having CFGs get similar treatment is useful.
2017-12-28 17:40:47 -05:00
smf-
e898042fd7 remove stutter in dump command ascii bytes (nw) 2017-12-26 20:32:54 +00:00
AJR
a72b3e4ae6 Add option to disable saving NVRAM on exit 2017-12-26 14:04:39 -05:00
Vas Crabb
25f84e3bf0 srcclean and manual cleanups (nw)
please people, remember to keep source UTF-8 and if you're committing on behalf of others, clean up indents to meet MAME conventions
anyone can run srcclean over a submission and see what will get hit
2017-12-24 15:03:04 +11:00
vadosnaprimer
c4ca6d02c0 missing return 2017-12-22 07:58:12 +03:00
vadosnaprimer
7e7f2fafd0 rewind implementation fixes and improvements
- reset scheduler savestate to what it was for years before rewind
-- changing saved variables should be done after thorough testing. right now, adding some vars breaks some machines, adding other vars breaks others
- switch to megabyte-wise capacity
-- savestate size greatly differs between machines, relying on state count is unstable
- switch to internal indexing
-- no longer depends on inaccurate machine time
- rewind accelerator key in debugger (Ctrl+F11)
- report capacity hit (once), with some useful info
- make error reports saner
- mention rewind and rewind_capacity in the docs
2017-12-22 04:39:14 +03:00
hap
b116a0166f dvstate beamx/beamy/frame: set to 0 on invalid(eg. screenless) (nw) 2017-12-21 18:11:38 +01:00
AJR
4d95348cf5 debugbuf: Back to uppercase hex (nw) 2017-12-21 09:22:45 -05:00
smf-
b09a842ff6 Stop save and load logging timers unless VERBOSE is set. [smf] 2017-12-20 19:51:15 +00:00
AJR
377c4371f2 Stop including random strings of question marks in key names 2017-12-19 10:07:53 -05:00
AJR
b75557d9b7 zephyr: Correct XTAL value (nw) 2017-12-18 20:43:15 -05:00
AJR
469caf4245 Cause of crash reported on MAMEWorld (nw) 2017-12-18 10:50:49 -05:00
AJR
d0b15795a2 eurocom2: Correct CPU type and XTAL value (nw) 2017-12-15 08:00:07 -05:00
smf-
09539116b5 we're all friends (nw) 2017-12-15 11:37:15 +00:00
Vas Crabb
2d6a478ae6 Revert "Command to print all debugger help to html file" 2017-12-15 19:52:08 +11:00
AJR
39c59a5041 Remove machine member of address_space (nw) 2017-12-14 22:14:46 -05:00
AJR
72ba280d7d Eliminate remaining uses of address_space::machine() outside of emumem (nw) 2017-12-14 22:09:38 -05:00
R. Belmont
0971e20baf
Merge pull request #2926 from vadosnaprimer/debughlp_html
Command to print all debugger help to html file
2017-12-14 19:09:48 -05:00
smf-
49b83056b1 another example of m_machine(machine()) (nw) 2017-12-14 23:27:03 +00:00
smf-
ed2502fb4b replacing space.machine() with machine() has some interesting consequences (nw)
m_machine(space.machine())
running_machine &machine() const { return m_machine; }
2017-12-14 22:02:09 +00:00
Olivier Galibert
bd5b00af5f space.machine -> machine (nw) 2017-12-14 18:37:10 +01:00
Firehawke
9ece34eb21 Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame""
This reverts commit 54155441e9.
2017-12-13 21:31:27 -07:00
Firehawke
54155441e9 Revert "Merge branch 'master' of https://github.com/mamedev/mame"
This reverts commit f537428e5a, reversing
changes made to 0d70d79810.
2017-12-13 21:01:10 -07:00
AJR
6379bf5814 softlist_dev: Change misleading parameter name (nw) 2017-12-13 22:39:31 -05:00
AJR
d31e5bc061 tek4404: XTAL definition for video clock (nw) 2017-12-13 22:38:40 -05:00
AJR
5b5d527822 device_interface: Eliminate device pointer conversion (nw) 2017-12-13 22:37:16 -05:00
Vas Crabb
9bf81912d3 get rid of legacy BITSWAP* (nw) 2017-12-13 19:26:12 +11:00
Vas Crabb
b0a9c20788 Revert "Add BITSWAP4 and BITSWAP12 for future use (nw)"
This reverts commit 6084751936.

This is pointless pollution of the global namespace when you can call
bitswap<4>(...) or bitswap<12>(...) directly.  The existing BITSWAP8,
BITSWAP16, etc. were just kept for compatibility with code written
before we had variadic templates available.
2017-12-13 18:59:44 +11:00
AJR
cbfd13c077 Add XTAL values for various Japanese PCs and MCFG_SCREEN_RAW_PARAMS for fm7 (nw) 2017-12-11 19:05:02 -05:00
vadosnaprimer
4feda9bf3e debughlp - fix gcc build 2017-12-12 00:43:07 +03:00
vadosnaprimer
5ebdc209af add command to print all debugger help to html file
tweak static_help_list spacing to always pad commands and never pad explanations
2017-12-11 23:54:58 +03:00
AJR
6084751936 Add BITSWAP4 and BITSWAP12 for future use (nw) 2017-12-11 02:43:32 -05:00
AJR
05a9ab23c1 mpu4.cpp: Proper CPU type and XTAL value (nw) 2017-12-11 02:43:07 -05:00
AJR
c1a652b083 Moderate overhaul of device_rom_interface (nw)
- Allow endianness and data/address width to be altered during configuration
- Raise memory_space_config from private to protected so it can be overridden
- Make entire interface optional (as needed by one device to be added soon)
- Use interface_post_load instead of explicitly registered delegate
- Only call rom_bank_updated when bank actually changes
- Remove prototypes for nonexistent functions
2017-12-10 09:02:38 -05:00
smf-
fc710e0786 don't lie (nw) 2017-12-07 14:37:39 +00:00
smf-
3379072a5d Fix MAME lockup if you step and PlayStation based game twice then rewind twice (nw) 2017-12-07 14:19:12 +00:00
Robbbert
6bec01265d (nw) fixed typo, and rewind off by default. 2017-12-08 00:42:01 +11:00
Olivier Galibert
ece4f6d114 Yes another memory window fix (nw) 2017-12-07 14:28:03 +01:00
R. Belmont
4a0d5ba02f
Merge pull request #2899 from vadosnaprimer/rewind
explain the rewind command in debughlp
2017-12-07 08:02:40 -05:00
AJR
ab93968307 Fix watchpoint hit message for address-shifted processors (nw) 2017-12-06 21:52:10 -05:00
vadosnaprimer
6a47d8ccc7 explain the rewind command in debughlp
fix a typo in the stateload description
2017-12-06 23:28:46 +03:00
R. Belmont
09203fd173
Merge pull request #2897 from vadosnaprimer/rewind
Rewind feature and RAM savestates.
2017-12-06 12:37:30 -05:00
vadosnaprimer
a88483233d icount was missing from the savestates
When you load a state, icount (*icountptr) would remain whatever it was before loading, messing with the remaining cycles and with the amount of code executed per run() call. This introduced non-determinism and badly influenced usage of savestates while debugging. machine().time() would also return wrong values after that, since it adds remaining cycles.
2017-12-06 19:31:58 +03:00
vadosnaprimer
a66cb36cc7 Rewind feature and RAM savestates.
This starts the work requested in #2398.

How RAM states work.

Implemented using util::vectorstream. Instead of dumping m_save.m_entry_list to file, it writes them as binary to vectorstream. Compression is not used, as it would slow down the process. The header is written as usual, also in binary. When a state is loaded, the savestate data gets binary-read from vectorstream.

How rewind works.

Rewind is optional, it can be turned off through MAME GUI while not running. Rewind capacity is available there too. Rewind step hotkey is available from the standard hotkey menu. In the debugger you have the "rewind" command ("rw" shortcut) that works the same as the hotkey.

Every time you advance a frame (pause step), rewinder captures a RAM savestate of the frame you were at. It does the same when you do step into/over/out in the debugger. Every time it captures a new state (and when you unpause), it marks as invalid all its states that go after the current machine time, because input might change, so they are not relevant anymore. It keeps their buffers allocated though, for future use. When rewinder runs out of allowed amount of savestates it can have, it invalidates the first state in the list and tosses its unique_ptr to the end of the list, then it uses its buffer to capture a new state. When you hit the rewind step key, or use "rewind" command in the debugger, it loads a state that is immediately before the current machine time. Invalid states between valid ones are not allowed to appear, as that breaks rewinder integrity and causes problems. Rewinder keeps its own set of ram states as a vector of unique_ptr's. All rewinder operations and errors get reported using machine().popmessage().
2017-12-06 19:31:10 +03:00
Olivier Galibert
41f7224302 Nicer autoscrolling (nw) 2017-12-04 09:42:27 +01:00
Olivier Galibert
3555ce616e More fixes and simplifications (nw) 2017-12-03 16:55:38 +01:00
Olivier Galibert
4f90cbd744 Watchpoint fixes (nw) 2017-12-03 16:38:53 +01:00
Olivier Galibert
82d9463dc0 Fix the memory windows (nw) 2017-12-03 15:04:16 +01:00
R. Belmont
4f59d001e9
Merge pull request #2813 from JoakimLarsson/prodigy_webinterface_1
Prodigy webinterface poc
2017-12-02 16:42:23 -05:00
Vas Crabb
843cf2982e allow compiler a little more optimisation leeway in x86 count_leading_* (nw) 2017-12-02 23:44:19 +11:00
Vas Crabb
f88769555b constexpr implies inline, generalise iabs, work around lack of C++14 constexpr in VS2015 (nw) 2017-12-01 23:45:11 +11:00
AJR
45f27ffaab validity.cpp: Prevent insane recursion when multiple slot devices have the same tag (nw) 2017-11-30 19:34:03 -05:00
Robbbert
c00efe9e95 (nw) debugcmd : exiting isn't an error 2017-12-01 10:25:54 +11:00
Olivier Galibert
08e2b24551 Reset m_dasm on source switch (nw) 2017-11-30 20:08:18 +01:00
Olivier Galibert
585460619b Fix non-initialized member of debugcpu (nw) 2017-11-30 19:40:41 +01:00
Vas Crabb
199f92a2b0 (nw) misc cleanup: start replacing auto_alloc_* with smart pointers, get
rid of reference constants in the debugger in favour of capturing the
value in the bind/lambda (less ugly casting)
2017-12-01 05:34:53 +11:00
Olivier Galibert
7c8a1fa409 Pet peeving with extreme prejudice (nw) 2017-11-30 12:29:32 +01:00
Olivier Galibert
0584df8b9c fixes (nw) 2017-11-30 08:12:28 +01:00
Olivier Galibert
b709fb78df Fix save 2017-11-29 20:19:09 +01:00
smf-
57cdf5a9d8 fix for Visual Studio 2017 (nw) 2017-11-29 12:30:09 +00:00
smf-
53eb635ddd remove debug code (nw) 2017-11-29 11:43:22 +00:00
Olivier Galibert
c46e1007a8 emumem: API change [O. Galibert]
* direct_read_data is now a template which takes the address bus shift
  as a parameter.

* address_space::direct<shift>() is now a template method that takes
  the shift as a parameter and returns a pointer instead of a
  reference

* the address to give to {read|write}_* on address_space or
  direct_read_data is now the address one wants to access

Longer explanation:

Up until now, the {read|write}_* methods required the caller to give
the byte offset instead of the actual address.  That's the same on
byte-addressing CPUs, e.g. the ones everyone knows, but it's different
on the word/long/quad addressing ones (tms, sharc, etc...) or the
bit-addressing one (tms340x0).  Changing that required templatizing
the direct access interface on the bus addressing granularity,
historically called address bus shift.  Also, since everybody was
taking the address of the reference returned by direct(), and
structurally didn't have much choice in the matter, it got changed to
return a pointer directly.

Longest historical explanation:

In a cpu core, the hottest memory access, by far, is the opcode
fetching.  It's also an access with very good locality (doesn't move
much, tends to stay in the same rom/ram zone even when jumping around,
tends not to hit handlers), which makes efficient caching worthwhile
(as in, 30-50% faster core iirc on something like the 6502, but that
was 20 years ago and a number of things changed since then).  In fact,
opcode fetching was, in the distant past, just an array lookup indexed
by pc on an offset pointer, which was updated on branches.  It didn't
stay that way because more elaborate access is often needed (handlers,
banking with instructions crossing a bank...) but it still ends up with
a frontend of "if the address is still in the current range read from
pointer+address otherwise do the slowpath", e.g. two usually correctly
predicted branches plus the read most of the time.

Then the >8 bits cpus arrived.  That was ok, it just required to do
the add to a u8 *, then convert to a u16/u32 * and do the read.  At
the asm level, it was all identical except for the final read, and
read_byte/word/long being separate there was no test (and associated
overhead) added in the path.

Then the word-addressing CPUs arrived with, iirc, the tms cpus used in
atari games.  They require, to read from the pointer, to shift the
address, either explicitely, or implicitely through indexing a u16 *.
There were three possibilities:

1- create a new read_* method for each size and granularity.  That
   amounts to a lot of copy/paste in the end, and functions with
   identical prototypes so the compiler can't detect you're using the
   wrong one.

2- put a variable shift in the read path.  That was too expensive
   especially since the most critical cpus are byte-addressing (68000 at
   the time was the key).  Having bit-adressing cpus which means the
   shift can either be right or left depending on the variable makes
   things even worse.

3- require the caller to do the shift himself when needed.

The last solution was chosen, and starting that day the address was a
byte offset and not the real address.  Which is, actually, quite
surprising when writing a new cpu core or, worse, when using the
read/write methods from the driver code.

But since then, C++ happened.  And, in particular, templates with
non-type parameters.  Suddendly, solution 1 can be done without the
copy/paste and with different types allowing to detect (at runtime,
but systematically and at startup) if you got it wrong, while still
generating optimal code.  So it was time to switch to that solution
and makes the address parameter sane again.  Especially since it makes
mucking in the rest of the memory subsystem code a lot more
understandable.
2017-11-29 10:32:31 +01:00
smf-
c2e7f912c1 fix building with Visual Studio 2017 & clang 5.0.0 (also tested with gcc 7.2.0) (nw) 2017-11-28 09:10:05 +00:00
Olivier Galibert
b247832947 Nice subtle one coverity (nw) 2017-11-28 09:10:09 +01:00
Olivier Galibert
cec449c33b Fix tms0980 debugger hook and remove leftover debug code (nw) 2017-11-28 08:30:35 +01:00
Olivier Galibert
cbfa34e2c9 Fix inclusion test (nw) 2017-11-28 07:32:34 +01:00
AJR
02a4917f30 swtpc: Split into two systems (SWTBUG and MIKBUG)
- Define alternate XTAL for MIKBUG version (nw)
- Add RAM configuration and MC14411 device (nw)
- Reduce terminal baud rate to the supported maximum of 1200 (nw)
- Add notes for future reference (nw)
2017-11-26 12:28:24 -05: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
Vas Crabb
fd195fdd8a srcclean (nw) 2017-11-26 13:33:54 +11:00
Ivan Vangelista
98b8023e8a
xtal.h: added a small note [Guru] 2017-11-23 07:21:35 +01:00
AJR
7d6a7b1b93 Even more XTAL values (nw) 2017-11-22 20:24:10 -05:00
hap
8aede10f25 dragon: fixed clockspeed (nw)
http://mametesters.org/view.php?id=6772
2017-11-22 23:35:39 +01:00
AJR
b37f4794d8 Remove pulse_input_line version using CPU minimum quantum, which can (though ideally shouldn't) be used explicitly now (nw) 2017-11-22 13:53:35 -05:00
AJR
7331bddbef xtal.h: Major addition of terminal XTAL frequencies (nw) 2017-11-22 13:51:02 -05:00
AJR
03b46122de Fix core rounding error with analog input sensitivity scaling (nw) 2017-11-21 14:04:20 -05:00
Joakim Larsson Edstrom
144a7cbb59 prodigy: WIP Added support for SVG web UI through XSL transformation of the LAY file 2017-11-16 22:48:13 +01:00
hap
0b50eb9099 Revert "pulse_input_line: change units to cycles and set default param to min_cycles (nw)"
This reverts commit 46bad5c707.
2017-11-15 17:06:39 +01:00
hap
46bad5c707 pulse_input_line: change units to cycles and set default param to min_cycles (nw) 2017-11-15 15:40:43 +01:00
AJR
50637d602b Replace driver_device::generic_pulse_irq_line with device_execute_interface::pulse_input_line (nw) 2017-11-14 23:34:11 -05:00
AJR
dcfdab2735 Better wraparound handling for relative inputs 2017-11-13 18:13:58 -05:00
AJR
bf8eac0fbb Various palette and screen improvements (nw)
- Use device_resolve_objects to remove the need for resolve_palette
- Palette format no longer depends on configuration of first screen
2017-11-13 00:07:48 -05:00
angelosa
e4dcab711c Fixed previous Data East commit to use 12 MHz XTAL instead [Angelo Salese]
(out of whatsnew: above supposedly logs in whatsnew.txt, as a reminder for changing the log message)
2017-11-11 22:54:44 +01:00
angelosa
bd035338bf Added HMC20 and screen raw params for following drivers: [Angelo Salese]
* bogeyman.cpp, chanbara.cpp, dec0.cpp, dec8.cpp, firetrap.cpp, mystston.cpp, ssozumo.cpp,
2017-11-11 00:20:30 +01:00
AJR
5fba45b0bc v9938, v9958: Convert to use RGB32 bitmaps
- Palette has been retained mostly for the sake of the palette viewer, and now reflects the actual programmed values, rather than being a fixed RRRGGGBBB encoding plus a hacky mess for the V9958's YJK colors.
- V9938-on-V9938 transparent overlay is fixed for meritm.cpp (was broken a few releases ago).
2017-11-05 21:55:34 -05:00
hap
036541f02c layout readme: reword (nw) 2017-11-05 01:31:53 +01:00
Martin Lindhe
b3c2645085 fix some typos (#2772) 2017-11-03 14:58:54 +01:00
AJR
b0ff0b7c70 mc68901: Improve USART behavior for polled operation 2017-11-02 20:11:33 -04:00
AJR
bc1c5622d4 cd2650: Add proper XTAL frequency, MCFG_SCREEN_RAW_PARAMS and some info (nw) 2017-11-01 21:23:42 -04:00
AJR
b1a1aba510 driver.cpp: Remove irqN_line_pulse interrupt generators (nw)
Vestigial commented-out uses remain in cdi.cpp. This does not affect nmi_line_pulse.
2017-10-28 14:58:04 -04:00
AJR
ac8d8a23b2 poly.cpp: Define XTAL (nw) 2017-10-28 01:52:31 -04:00
Vas Crabb
d5ac7c11cf Move object finder resolution before device_start - should solve github #2759 2017-10-28 13:58:03 +11:00
AJR
0853bb469b Merge popcount implementation in emucore.h with the new eminline (nw) 2017-10-24 09:43:07 -04:00
Vas Crabb
4c29419cab srcclean (nw) 2017-10-22 12:34:30 +11:00
AJR
b4d844f5dc xtal.h: Add two more values (nw) 2017-10-19 23:02:46 -04:00
hap
f407c55459 input: make xinput analog triggers half-axes and default IPT_PEDAL2 to RZ- instead of Z+, placing IPT_PEDAL and IPT_PEDAL2 on separate axes. (nw) 2017-10-17 19:58:38 +02:00
angelosa
9033470d20 Hit save (nw) 2017-10-17 05:39:42 +02:00
angelosa
798035cde3 Proposed fix for MT #06154 (nw) 2017-10-17 05:39:40 +02:00
Ted Green
1c424550a1 voodoo: Few more SSE optimizations. (nw) 2017-10-15 12:19:39 -06:00
Curt Coder
48238ecaba tmc600: Fixed CPU frequency. (nw) 2017-10-14 19:55:11 +03:00
AJR
f299029078 distate: Polymorphic classes need virtual destructors (nw) 2017-10-13 22:08:44 -04:00
AJR
c6b2edfa89 Explicitly allow floating point values for state registers
Note that the internal debugger's expression interpreter is not set up to handle floating point values at all, so they remain disabled there.
2017-10-13 07:24:48 -04:00
AJR
f2dac42df3 Temporarily remove floating-point state registration (nw) 2017-10-13 04:39:59 -04:00
ajrhacker
8113e27292 device_state_interface: Polymorphism and std::function for entries (nw) (#2690)
* device_state_interface: Polymorphism and std::function for entries (nw)
- Create a templated subclass of device_state_entry to provide separate read/write interfaces for registers of varying widths. The efficiency impact of this should be minimal, given that this eliminates the need to make each byte width a subcase for reads and writes.
- Create similarly templated "pseudo-register" versions of device_state_entry that provides custom read/write interfaces through std::function. The intent of this is to eventually replace the dummy register + state_export interface hitherto necessary to provide debugger access to bankswitched or computed state registers.
- State registers can now be made read-only, and this is automatically done now when state_add is called with a std::function read handler but no write handler. This property is honored by MAME debug expressions.

* Add override keyword (nw)

* Remove explicit instantiations that were causing linking errors in tools build (nw)
2017-10-12 14:39:51 -04:00
Ted Green
297b7e2a61 voodoo: Incorporate some more sse optimizations. (nw) 2017-10-12 10:40:43 -06:00
R. Belmont
dc2b6e95eb Merge pull request #2672 from npwoods/multiple_natural_keyboard_bindings
Added support for multiple PORT_CHAR() bindings, and adopted in the CoCo driver  (addresses MT#2618)
2017-10-10 21:07:00 -04:00
Ted Green
1175023e95 rgbsse: Clamp intermediate values to u8. (nw) 2017-10-10 07:12:57 -06:00
tedgreen99
620f8550dd rgbsse: Optimize some sse routines. (nw) (#2700)
* rgbsse: Optimize some sse routines. (nw)
* rgbsse: Create a generic getter instead of having individual color operation. (nw)
* rgbsse: Allow up to 12 bits for scaling factors. (nw)
2017-10-09 08:56:21 -06:00
Vas Crabb
87f7bbb114 Expose condition for DIP switches, configuration entries, and adjusters.
This eliminates ambiguities between settings with different conditions
and allows a frontend/tool to generate a DIP switch preview.

(nw) Reduce number of calls to fprintf - saves overhead of setting up
the formatting engine.

(nw) Add the previously commented osborne1 chargen ROM for v1.4 BIOS now
that we've established that ROM BIOS applies to multiple regions and
-listxml reports it correctly.
2017-10-08 21:41:24 +11:00
AJR
2b112142ad xtal.h: Add definition for Osborne 1 main XTAL (nw) 2017-10-07 22:58:58 -04:00
npwoods
3f144b2861 Fixed an options overhaul regression (#2530)
This crash (discovered by Wizz) had the following symptoms:
1.  Start MAME
2.  Choose "Configure Machine"
3.  Choose "Video Options"
CRASH

This was the result of the options editor not having a fully formed list of options where it was expecting one.  The fix is to change the declaration of emu_options to one that have full OSD options (it is possible that SDLMAME needs something slightly different)

I created a osd_setup_osd_specific_emu_options(emu_options &) function that given an emu_options, will slap on system specific options.  I see this as only marginally less gross, and I have zero opinion on whether this should be changed to return an emu_options (rather than have a reference parameter), be a static method on emu_options, or what have you.
2017-10-06 13:54:10 -04:00
RobertoFresca
41ff5f675a Note Chance: There is not a resonator, so OKI clock is derived
from main crystal [Roberto Fresca]
2017-10-04 03:36:35 -03:00
RobertoFresca
3b0d84d95c Note Chance: Added crystal/oscillator to the harcoded list [Roberto Fresca] 2017-10-04 01:46:25 -03:00
AJR
da7cd69f88 Remove timer_device from emu.h and move it out of src/emu (nw) 2017-10-01 22:46:42 -04:00
smf-
7dfb01a2d2 fix unused variable error compiling with MSVC (nw) 2017-10-01 18:57:07 +01:00
AJR
a9d089903e spbactn: Provisional MCFG_SCREEN_RAW_PARAMS (nw) 2017-10-01 12:53:38 -04:00
Vas Crabb
de0bd3f3f7 work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81721 (nw) 2017-09-30 14:19:45 +10:00
Ted Green
93c7761d9d rgbsse: Rather simple performance optimization. (nw) 2017-09-29 11:05:14 -06:00
Vas Crabb
b75264927b Generate layouts for systems with three or more screens 2017-09-29 19:57:47 +10:00
Sergey Svishchev
fa45685b8a ms6102 (Elektronika MS6102.02, text terminal): new skeleton. 2017-09-26 22:18:05 +03:00
smf-
bcb4be3a5d fix for clang 5 unused lambda capture errors (nw) 2017-09-24 17:49:35 +01:00
Nathan Woods
d850afa605 Added support for multiple PORT_CHAR() bindings, and adopted in the CoCo driver (addresses MT#2618) 2017-09-24 11:50:30 -04:00
Vas Crabb
a734a3b8e9 (nw) srcclean - please use UTF-8 for source files, stuff that isn't valid UTF-8 will be nuked, and cleaning it up by hand is annoying 2017-09-24 11:41:45 +10:00
AJR
56092fd848 sun2.cpp: Correct oscillator values; add Am9513 timers (nw) 2017-09-23 20:03:31 -04:00
Ted Green
9b5220274a rgbsse: Declare scale_imm_and_clamp as inline to ensure that it compiles as fully inlined in voodoo rasterizers. (nw) 2017-09-23 08:17:15 -06:00
Vas Crabb
165da5efa4 Start adding stuff for iterating ROM entries in a more C++ way without needing to allocate everywhere, improve performance of -listxml by another 10% or so 2017-09-22 21:36:37 +10:00
Dirk Best
ce256c6444 New machines marked as NOT_WORKING
----------------------------------
Triumph-Adler alphatronic P3 [Dirk Best, rfka01]

Mostly a skeleton driver, but shows the initial boot message.
2017-09-21 14:06:56 +02:00
Joakim Larsson Edström
25a7ab82af Candela PAL driven address map (#2657)
* mc6840ptm/mc6850acia: fixed so that LOG_OUTPUT_FUNC can be defined as printf

* can09t: replaced static address map with a PAL driven address map enabling several BASIC commands previously failing

* logmacro.h: Added support for C++ output streams using LOG_OUTPUT_STREAM instead of using printf as LOG_OUTPUT_FUNC [Vas]

* 6840: removed c_str() in LOG statements
2017-09-19 21:35:10 +10: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
hap
573380fb4d Merge pull request #2647 from npwoods/key_name_switch_formatting
Changing switch statement in ioport_field::key_name() to MAME favored formatting
2017-09-16 19:47:09 +02:00
angelosa
5e249520ff Revert Z80_R usage in alibaba, added a note about machine().rand(), open to suggestions (nw) 2017-09-15 00:47:08 +02:00
hap
b117f75925 ioport: remove really bad usage of machine->rand() (nw) 2017-09-15 00:03:07 +02:00
Nathan Woods
fa4b823125 Changing switch statement in ioport_field::key_name() to MAME favored formatting 2017-09-10 09:20:28 -04:00
Nathan Woods
3f24d4173c Using a better overload of utf8_from_uchar() in ioport_field::key_name (nw) 2017-09-10 09:17:55 -04:00
briantro
01a77b3ac8 gaelco2.cpp: Base Gaelco game's CPU clock speed on actual OSCs (nw) 2017-09-05 22:03:44 -05:00
Vas Crabb
6a4e26694a natural keyboard: prefer lower shift states, eliminate O(n) lookup
allows Alt-combos on European Amiga keyboards to be restored as MAME
will now prefer the simpler Shift-combos to get characters that can be
typed in more than one way
2017-09-05 20:25:40 +10:00
npwoods
67ddfe302c Added a natural keyboard validation to check for valid natural keyboard (uni)codes (#2618) 2017-09-05 17:27:45 +10:00
Vas Crabb
e475581ac1 fix exit status (nw) 2017-09-05 11:03:28 +10:00
Nathan Woods
c4352ecc8a -validate will now report an error if no matches occur 2017-09-04 11:46:56 -04:00
Vas Crabb
70279ab5a2 that doesn't require an instance (nw) 2017-09-03 12:51:21 +10:00
hap
fe810ad8b5 rendlay image_component: detect image format(png) before loading image. No PNG error message anymore when loading JPG. (nw) 2017-09-02 23:12:27 +02:00
Vas Crabb
5a70a9722a Validate BIOS names and fix most errors found:
* Error on characters other than [a-z0-9.-_] in name
* Error on duplicate name or description
* Error on non-existent default BIOS

Still errors for duplicate BIOS descriptions in AdamNet FDC and mc1502 -
I dont' know enough about these systems to make useful descrptions.
Could someone who knows what these things are please disambiguate the
descriptions?
* Adam FDC descripes 320ta, dbl24 and dsdd as "320KB DSDD"
* mc1502 describes v531 and v531_92 as "v5.31 12/10/92"
2017-08-25 14:11:03 +10:00
angelosa
6a3c352a8d ioport.cpp: return explicit "file not found" error if inp file isn't found on playback, added error code number to any other error found [Angelo Salese] 2017-08-25 04:44:46 +02:00
Scott Stone
4bc760406f New machines marked as NOT_WORKING
----------------------------------
Magic Reel  [TeamEurope]
2017-08-24 19:19:06 -04:00
Vas Crabb
848dbb9e8b fix -valid with MSVC (nw) 2017-08-24 17:58:00 +10:00
AJR
59f05991cb Improved way to transform offsets for AM_DEVREAD/_DEVWRITE (nw)
In the past few hours AM_DEVREADWRITE_RSHIFT was created. This has made a lot of MAMEdevs (well, mostly R. Belmont) very angry and has widely been regarded as a bad move.

This patch replaces AM_DEVREADWRITE_RSHIFT with a similar but more functional-looking interface (now known as AM_DEVREADWRITE_MOD), which also now supports address line inversion as well as shifting.
2017-08-23 20:57:28 -04:00
ajrhacker
020a6fbf11 Add address-shifted versions of AM_DEVREAD/_DEVWRITE/_DEVREADWRITE (nw) (#2586)
These new macros make it easy to map devices addressed using higher address lines (which on actual HW helps to reduce loads on the lowest address lines) without needing to set up custom handlers and associated device finders. The implementation should not impact the efficiency of the core memory system (which Olivier Galibert is trying to improve) since the semantic details are contained within C++11 lambdas.
2017-08-22 22:32:12 +02:00
Nathan Woods
098cfab5b8 Fixed MameTesters bug #6621 2017-08-19 15:59:33 +10:00
Vas Crabb
61983736e8 png: make it not leak memory by default, and look a but more like C++ 2017-08-13 18:12:54 +10:00
Vas Crabb
44bc3ffa43 png: support 16-bit samples 2017-08-13 15:53:36 +10:00
Vas Crabb
71c7cfe525 More PNG handling overhaul:
* Unify code for copying PNG data into bitmap for MAME and pngcmp
* Fix upsampling of monochrome PNGs (need to splat across byte)
* Add support for greyscale+alpha
* Detect more unsupported conditions rather than just behaving badly
2017-08-12 15:38:14 +10:00
Vas Crabb
a7b15fc928 add minimal support for reading Adam7 interlaced PNG
(nw) This is the path of least resistance, and I plan to fix it up
later, I just wanted to get it to actually work first.  Decompression
and unfiltering is fully supported, at least for all the pixel formats
that previously worked.  Expanding 1/2/4bpp to 8bpp should work
properly, too.  Bitmap mapping for Adam7 is only implemented in
rendutil.cpp which is whate everything in MAME uses.  The function in
png.cpp (used by pngcmp) has not been updated.  At some point I'll unify
at least one of the functions in rendutil.cpp with the one in png.cpp
and we can go from three functions that need to do the mapping down to
two at the most.
2017-08-12 02:43:53 +10:00
Vas Crabb
b363e92b5d Don't process every character individually when searching - this reduces
lag if you keep typing while a big list is searched.

(nw) patch up German translation
2017-08-10 18:05:54 +10:00
Vas Crabb
54ff6183fc ui: improve layout of art/info box, support mousewheel scroll in info
text, allow home/end to jump to beginning/end of filter list,
consolidate logic

(nw) A number of vestigial constants have been removed.  Some hacky
input types that were just used as a trick to pass information between
menu functions are gone.  MACHINE_NO_STANDALONE is a relic from when
drivers were used as arbitrary ROM containers, and in a world of
first-class devices this is no longer necessary.
2017-08-10 15:03:52 +10:00
AJR
b924b468b4 debugcmd.cpp: Give this error message a newline (nw) 2017-08-08 14:38:07 -04:00
Vas Crabb
6ef4a1452d Revert "(nw) Fixed random crashing when swapping one slot device with another."
This reverts commit 9968fc71b0.

This hides the underlying problem that the options structure is getting
out-of-sync.  It's losing the image option but not the underlying
option.  Masking the problem doesn't fix it.
2017-08-06 21:47:53 +10:00
Christian Brunschen
336a636aed Refactor server_{ws,http}.hpp into separate interface and implementation. (#2548)
Refactor server_{ws,http}.hpp into separate interface and implementation headers.
When shutting down the HTTP server, also explicitly stop the asio::io_context.
2017-08-06 21:25:55 +10:00
Robbbert
9968fc71b0 (nw) Fixed random crashing when swapping one slot device with another. 2017-08-06 21:01:11 +10:00
Dirk Best
0bdd1df2e3 New driver: Kontron PSI98
Basic system is done and it can boot from floppy, but there are still
many things to add, therefore marked as NOT_WORKING for now.

New machines added as MACHINE_NOT_WORKING
-----------------------------------------
Kontron PSI98 [Dirk Best, rfka01]
2017-08-04 05:19:03 +02: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
Vas Crabb
53e5439884 fix -sleep 2017-08-02 04:06:04 +10:00
Vas Crabb
a19a685621 more const, get rid of forced sleep (nw) 2017-08-02 03:33:02 +10:00
Vas Crabb
1e8c0b23c3 This is too contentious, please put it up for review
Revert "Changes to debugger memory address translation"

This reverts commit bb0964f9a2.
2017-08-01 15:19:44 +10:00
AJR
bb0964f9a2 Changes to debugger memory address translation
- memory_translate now returns an address space number rather a boolean flag, permitting addresses in part of one space to map to an entirely different space. This is primarily intended to help MCUs which have blocks of internal memory that can be dynamically remapped, but may also allow for more accurate emulation of MMUs that drive multiple external address spaces, since the old limit of four address spaces per MAME device has been lifted.
- memory_translate has also been made a const method, in spite of a couple of badly behaved CPU cores that can't honestly treat it as one.
- The (read|write)_(byte|word|dword|qword|memory|opcode) accessors have been transferred from debugger_cpu to device_memory_interface, with somewhat modified arguments corresponding to the translate function it calls through to if requested.
2017-08-01 00:21:19 -04:00
AJR
ba013a5e2a xtal.h: Value from PCB photo (nw) 2017-07-30 22:51:32 -04:00
yz70s
5ebe819cce In the windows debugger log window add a Log/Clear menu to remove all logged messages (nw) 2017-07-30 19:09:59 +02:00
Vas Crabb
e9c9e0e06d get rid of string hashes when fetching output values in layout rendering, too 2017-07-30 01:23:34 +10:00
Vas Crabb
f288f5df71 work around GCC ambiguous template error (nw) 2017-07-29 23:24:07 +10:00
Vas Crabb
e6e9ef439c Add N-dimensional output finder to avoid runtime string hashes - intlc440 in RUN mode goes from 800% to 2000% unthrottled on 2010 i7 notebook 2017-07-29 21:32:49 +10:00
Vas Crabb
3a5c5d15c7 Add support for layout item groups, replace simple_list with more
appropriate containers, remove misleading const qualifiers, reduce
repeated XML walking.

(nw) Groups aren't parameterised, so they aren't as useful as they could
be (yes, it's on my TODO list).  However, it's already useful for
putting a common set of elements in multiple views, potentially at
different locations/scales.  See intlc44.lay and intlc440.lay for
examples of the level of copypasta this can eliminate.  Be aware that
groups with explicit bounds don't clip thair content, it's only used for
calucating the transform matrix.
2017-07-29 15:17:14 +10:00
Vas Crabb
2dc60cf04b reduce weight of render.h by moving component specialisation declarations into rendlay.cpp 2017-07-28 17:29:42 +10:00
hap
ee6f952f19 added flag for imperfect timing (nw) 2017-07-27 21:01:07 +02:00
Vas Crabb
38bcf2e92d Trade MACHINE_IMPERFECT_KEYBOARD, MACHINE_NODEVICE_CAMERA and MACHINE_NODEVICE_WAN for MACHINE_IMPERFECT_CONTROLS.
* MACHINE_IMPERFECT_KEYBOARD is more applicable on keyboard devices - most of them should be devicified eventually.
* MACHINE_NODEVICE_CAMERA tends to apply across a family of machines, so it's easy to apply at state class level.
* MACHINE_NODEVICE_WAN isn't even used.
* MACHINE_IMPERFECT_CONTROLS is widely applicable, knock yourselves out adding it to GAME macros.
* Updated machines that were using MACHINE_IMPERFECT_KEYBOARD or MACHINE_NODEVICE_CAMERA to apply it at device or state class level.
2017-07-27 22:39:24 +10:00
Vas Crabb
22d80b3529 Move unemulated/imperfect flags from machines into devices.
Right now, flags for unemulated/imperfect features apply at system
level.  This falls over quickly with systems that have slot devices.
For example you can plug in a broken sound card or keyboard on a PC or
Amiga driver and get no warnings.  There's also no way to propagate
these flags from a device to all systems using it.

This changeset addresses these issues.  It's now possible to report
unemulated/imperfect features on a device level with static
unemulated_feeatures() and imperfect_features() member functions.  So
far the only thing using this is the votrax device.

To support front-ends, this is exposed in -listxml output as a new
"feature" element that can appear in system/device descriptions.  It has
a "type" attribute indicating which feature it is, potentially a
"status" attribute if the device itself declares that the feature is
unemulated/imperfect, and potentially an "overall" attribute if the
device inherits a more severe indication from a subdevice.  The embedded
DTD describes possible values.

Example: device/machine declares imperfect sound:
<feature type="sound" status="imperfect"/>

Example: device/machine declares unemulated keyboard:
<feature type="keyboard" status="unemulated"/>

Example: device declares imperfect controls but inherits unemulated
controls from a subdevice:
<feature type="controls" status="imperfect" overall="unemulated"/>

Example: device doesn't declare imperfect LAN but inherits it from a
subdevice:
<feature type="lan" overall="imperfect"/>

It's still possible to add these flags to machines in the GAME/COMP/CONS
macro.  If the state class declares them with static member functions,
the two sources will be combined.

If you subclass a device, you inherit its flags if you don't redefine
the relevant static member functions (no override qualifier is necessary
since they're static).

The UI has been updated to display appropriate warnings for the overall
machine configuration, including selected slot devices, at launch time.
The menus don't display overall status, only status for the machine
itself.  We can make it scan subdevices if we decide that's desirable,
it just needs caching to enure we don't take a huge performance hit.
2017-07-27 09:56:53 +10:00
smf-
3374c5639f stop hotspot from crashing when you start running. (nw) 2017-07-25 16:17:15 +01:00
smf-
8a12dd4dc6 Don't assume a watch point exists for the address space passed to watchpoint_update_flags(), which fixes the hotspot command. (nw) 2017-07-25 11:10:01 +01:00
Nathan Woods
281223e497 Cleanup/bulletproofing to the issue Wizz just found 2017-07-24 01:52:21 +10:00
Robbbert
976a3724e2 (nw) Save partname to inifile, so that the correct part is loaded next time. 2017-07-24 01:33:38 +10:00
Vas Crabb
a11d1fe266 convenience macro for enum bitwise operators (nw) 2017-07-22 14:32:29 +10:00
Vas Crabb
05e84dccc0 * Make XML file a class of its own managed with smart poitners
* Save/restore a little more of Cocoa debugger state
2017-07-21 11:47:41 +10:00
Nathan Woods
4af745e751 Changed Romload to show all actual hashes on a mismatch 2017-07-18 23:05:56 +10:00
James Baicoianu
785e6f2fc9 Export soft_reset, hard_reset, exit, load, and save functions for Emscripten builds 2017-07-15 15:17:29 +10:00
James Baicoianu
15c2bb0c08 Fix save/load states in Emscripten build (#2470)
* Fix save/load states in Emscripten build
* Simplified Emscripten integration points
* Moved standalone JS functions to be static member functions of running_machine
* Improved Emscripten main loop
* Use convenience functions for cleaner code

As an added bonus, this now allows for proper shutdown of the running machine when running in the Emscripten environment - previously, attempts to exit the program were just being ignored.
2017-07-15 14:00:09 +10:00
Vas Crabb
7aa87af1c8 remove this check - it causes MSVC release builds to crash, and the things it flags usually get detected elsewhere (nw) 2017-07-15 00:04:15 +10:00
AJR
e906f29a38 Make machine().describe_context() a const function returning a std::string (nw)
As part of this change (because std::string is not printf-compatible), several devices have been updated to use the modern logmacro.h logging system.
2017-07-13 12:58:47 -04:00
AJR
ca88a7720b Minor core cleanups (nw)
- disound.cpp: Make a few more methods const
- machine.cpp: c_str() is no longer needed with emu_file::open since it now takes a std::string
2017-07-13 10:36:19 -04:00
Olivier Galibert
9f614cdf44 Fix issue 2468 2017-07-13 12:55:35 +02:00
Vas Crabb
553d973126 detect parent/clone loops rather than extending a string forever 2017-07-13 19:23:43 +10:00
Vas Crabb
17790b2f5f forgot these (nw) 2017-07-13 15:54:28 +10:00
Vas Crabb
7718fe042c kill a trampoline (nw) 2017-07-13 15:51:33 +10:00
Vas Crabb
66de90675f Make device_memory_interface own its address_spaces 2017-07-13 15:35:18 +10:00
Vas Crabb
5de1667104 don't drop an entire layout if one view fails to load - it breaks intlc44/intlc440 with null_modem 2017-07-13 05:01:24 +10:00
Vas Crabb
c5c3012634 Cleaned up serial, matrix keyboard and TI-8x link protocol interfaces:
* Switched to delegate timers
 - Frees implementations from having to call timer method
 - Eliminates risk of ID conflicts with implementations/other interfaces
* Moved save state registration to interface post start
 - Plays nicely with device_missing_dependencies exceptions
 - Frees implementation from having to call save state registration method
 - Improves save state support in devices that neglected to call method
2017-07-11 02:31:42 +10:00
Vas Crabb
536b2153d9 make device_memory_interface slightly less of a special case, use a typedef to avoid nested templates everywhere (nw) 2017-07-10 19:35:07 +10:00
Vas Crabb
d18aa3e097 never hurts to srcclean (nw) 2017-07-09 03:21:32 +10:00
AJR
2b2a177017 Fix subtle command regression (nw) 2017-07-06 21:25:24 -04:00
R. Belmont
dbe3b17b85 Merge pull request #2443 from cbrunschen/esqpanel
Add an external panel for the Ensoniq VFX family of keyboards
2017-07-06 17:42:40 -04:00
R. Belmont
ef5ad0cbd9 Merge pull request #2410 from npwoods/debugger_load
Made the debugger 'load' length field be optional, C++-ification
2017-07-06 16:19:09 -04:00
Christian Brunschen
3bcb2546db better handle the case where HTTP is not enabled. 2017-07-06 00:19:04 +01:00
Christian Brunschen
0206314395 Add an external panel for the Ensoniq VFX family of keyboards, with a websocket interface and an HTML/Javascript implementation that can be served over HTTP. 2017-07-05 17:27:34 +01:00
smf-
5b1e228082 fix clang build (nw) 2017-07-04 23:15:32 +01:00
Nathan Woods
91126182a4 Merge branch 'master' into debugger_load 2017-07-04 13:02:31 -04:00
smf-
6951a706ba Revert f8 behaviour, to run until next start of vblank, by re-adding a check that was removed as part of this commit (nw)
SHA-1: 56bd36c5ef
* Major refactoring of debugger core [Ryan Holtz]
* Eliminate globals/file statics
* Remove lots of stuff from global scope
* Use std::function for custom command registration
* Eliminate some trampolines
* Build fixes from Vas Crabb and balr0g
2017-07-04 12:33:43 +01:00
Olivier Galibert
92ef0f292c Initialization ordering fixes (nw) 2017-07-03 22:22:22 +02:00
Olivier Galibert
cbbbd07484 dimemory: Lift the cap on the number of address spaces per device [O. Galibert] 2017-07-03 08:03:57 +02:00
Olivier Galibert
cb1930f6e6 Rename AS_DECRYPTED_OPCODES to AS_OPCODES [O. Galibert] 2017-07-03 08:03:57 +02:00
Nathan Woods
d7e81e1e57 Fixed sorcerer unmount issue reported by Robert
Report from Robert:

Start mame sorcerer, then enter the slots menu, empty the rs232 slot, then choose Reset. It crashes with an access violation.
2017-06-30 10:09:05 +10:00
Bryan McPhail
1a3b2550fb Revert custom DECO conversion in emu dir 2017-06-28 10:16:18 -04:00
Bryan McPhail
1958ac5e6f Revert custom DECO conversion in emu dir 2017-06-28 10:15:50 -04:00
Bryan McPhail
dad7fca1f7 Add alternate revision of Cobra Command. Add correct palette weighting for all Dec8 games 2017-06-27 17:00:41 -04:00
AJR
3387442694 Fix scheduler overflow when a device executes for more cycles than there are in a second 2017-06-27 12:36:30 -04:00
Nathan Woods
ad3191cdd3 Fixed issue loading reset_on_load() images (#2414) 2017-06-27 16:20:45 +10:00
Nathan Woods
dd951ec62f Made the debugger 'load' length field be optional, C++-ification 2017-06-25 09:37:31 -04:00
Olivier Galibert
8d2a1d4268 debugcpu: Eliminate direct() from read_opcode [O. Galibert] 2017-06-25 11:15:00 +02:00
Olivier Galibert
d34051484d dvdisasm: Simplify by decoupling information creation and display rendering [O. Galibert] 2017-06-25 11:14:51 +02:00
Vas Crabb
fb61e98cc5 more srcclean (nw) 2017-06-25 15:21:44 +10:00
Vas Crabb
41e1555242 Merge branch 'release0187'
Conflicts:
	src/mame/drivers/accomm.cpp
2017-06-25 15:19:30 +10:00
Vas Crabb
f31e735053 srcclean (nw) 2017-06-25 15:18:14 +10:00
npwoods
b193e05cd7 Overhaul to how MAME handles options, take two (#2341) 2017-06-25 12:48:56 +10:00
Nathan Woods
d3c5f2939d Fixed an issue that could cause the debugger 'source' command to falsely display I/O error
I've discovered a scenario where reading to the end of file seems to trigger the fail bit, in addition to the eof bit.  Because of this, I've changed the error message to display when we can't read from the stream, but the eof bit is _not_ set
2017-06-24 09:39:55 -04:00
npwoods
2af3233101 Changed a few 'const char *' ==> 'const std::string &' in the MAME debugger (#2170) 2017-06-24 09:46:58 +10:00
AJR
3bff05cff7 Don't try to read past the end of a memory space in debug view 2017-06-22 20:50:04 -04:00
AJR
137a83532b Improve validation checking for address ranges (nw)
arcompact: Attempt at fixing I/O space (nw)
2017-06-22 17:35:08 -04:00
Olivier Galibert
9ef9bee33b Sorry test, it's not that I don't like you anymore, but there's this
AM_IMPORT_FROM guy there, and it's real love this time (nw)
2017-06-21 13:32:02 +02:00
Nathan Woods
c192588f61 Changed 'enum read_or_write' to be 'enum class' 2017-06-19 10:37:03 +10:00
Ivan Vangelista
60ceaff438 finally got rid of machine_mconfig_additions (nw) 2017-06-14 21:45:37 +02:00
AJR
2763505203 Should be slightly more efficient this way (nw) 2017-06-10 13:33:21 -04:00
AJR
6b7ca78a6c Further improvements to slot option validation (nw)
- All slot options are now validated whether or not they are user-selectable. This has already exposed a bug in one MSX-Audio device.
- Slots within slots, however, get added for validation only if they are declared fixed. Various Commodore floppy drives have been affected by this, since it doesn't look as if the current FDC emulation allows for detachability.
2017-06-10 12:34:43 -04:00
Vas Crabb
5e9030939e fix the missing default subslot devices on slot card validation 2017-06-11 00:52:01 +10:00
AJR
867aea06f5 Fix region validation for slot devices (nw) 2017-06-10 10:24:27 -04:00
Vas Crabb
622ddb1657 improve code for instantiating slot devices for validation - still doesn't find regions properly, need to work out why 2017-06-11 00:09:14 +10:00
Olivier Galibert
1c5d2e9466 Fix vas' problem, region_length() is expected to return 0 if the region doesn't exist, not crash (nw) 2017-06-10 11:49:12 +02:00
Vas Crabb
6975b237af Attempt basic validation of slot cards
Note that this currently segfaults on anything ISA, and probably other
stuff.  For example, any of the following will crash:

* mame -valid c386sx16
* mame -valid 386i
* mame -valid b128

Pushing before dinner so others can take a look
2017-06-10 19:31:16 +10:00
R. Belmont
ba5adfb204 Merge pull request #2367 from shattered/_046d995
New skeleton: GRiD Compass series
2017-06-07 15:51:55 -04:00
Olivier Galibert
b29c4c4323 devcb: Add line hold capability [O. Galibert]
Whoever feels like saying that "HOLD does not exist in hardware", I
invite to admire the beautiful TTL circuit to the left of the 68000s
in the Over Drive schematics.
2017-06-07 12:08:19 +02:00
Sergey Svishchev
24d016f62c New skeleton: GRiD Compass series 2017-06-06 21:29:43 +03:00
Vas Crabb
a730d77354 Add validation check for contradictory flags, fix things it caught (nw) 2017-05-31 19:30:44 +10:00
Olivier Galibert
38b56341b6 viewgfx: Fix the case when a gfx element has no palette [O. Galibert] 2017-05-30 15:51:15 +02:00
Nathan Woods
e220816ed1 Changed the profiler to use std::ostringstream as the text sink (instead of std::string) 2017-05-30 11:55:11 +10:00
Olivier Galibert
53feb420a4 drawgfx: Make the palette optional [O. Galibert]
device_gfx_interface does two things:
- go from a possibly weird rom layout to a one-byte-per-pixel tiled layout
- draw the tiles so created

The second part requires a palette, but the first doesn't.  And
low-level emulations of individual graphic chips (konami tilemap or
sprite generators for instance) are not supposed to care about the
palette.  They just output bits which are partly indexes into
palettes, and partly not, and in any case become pen ids only much
further in the rendering chain.  But they need access to the decoding
step, because one-byte-per-pixel is real nice..  So now such a device,
which inherits from device_gfx_interface, can call
set_palette_disable(true) and no palette tag will be required.
Calling the draw functions will segfault though.

As a side effect, the gfx_element constructor now takes a palette
pointer instead of a reference, since it's now optional.
2017-05-28 22:04:01 +02:00
Vas Crabb
e892661905 srcclean (nw) 2017-05-28 13:40:48 +10:00
npwoods
297bea495d Fixed issue when the hash length is zero (#2314)
* Fixed issue when the hash length is zero

The following is illegal, even if no elements in the pointer are accessed:

	std::vector<my_struct> my_vec(0);	// create an empty std::vector
	my_struct *ptr = &my_vec[0];

While this is a degenerate scenario, this should be fixed
2017-05-28 11:23:45 +10:00
Robbbert
7346e19dfa Fixed 2 bugs
1. If either a multipart softlist item was loaded, or a single-part item loaded into a system with more than one of the same media slot, then a reset would cause a fatal error.
2. If a non-existing image was listed in the ini, it would fatal error at start and there was no way to fix it except by hand-editing the ini file. This restores the previous behaviour of ejecting the bad image with the first error.
2017-05-25 23:58:51 +10:00
Nathan Woods
1617d0ab27 Retired min/max in attotime.h, in favor of std::[min|max]() 2017-05-25 21:45:46 +10:00
Vas Crabb
96c9112785 general cleanup:
* move rarely-used output and pty interfaces out of emu.h
* consolidate and de-duplicate forward declarations, also remove some obsolete ones
* clean up more #include guard macros
* scope down a few more things

(nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h -
this will make it far easier to keep them in sync with declarations than having
them scattered through all the other files.
2017-05-23 15:01:11 +10:00
Vas Crabb
ed231988f1 let's use Zaccaria as a demo for machine config in members 2017-05-22 19:48:30 +10:00
Vas Crabb
ceb586419e order of initialisation (nw) 2017-05-22 19:03:14 +10:00
Vas Crabb
fa80bef249 well, that causes mpu4 to take way too much memory to compile, the changes to device instantiation still apply (nw) 2017-05-22 18:55:02 +10:00
Vas Crabb
f7180a9504 and ioports, too (nw) 2017-05-22 18:29:16 +10:00
Vas Crabb
89524dd10e There's no day like today. This just follows up on the last commit: game drivers are less special special - they have configuration instantiated in the usual way. 2017-05-22 18:17:29 +10:00
Vas Crabb
a6ee791664 Goodbye MACHINE_CONFIG_FRAGMENT, it was nice knowing you.
(nw) This is a pretty minimal change.  The point where the root device is added has been moved
from the MACHINE_CONFIG_START macro to the constructor of the machine configuration class (made
possible by giving drivers their own device types).  This isn't the final change in this area.
The root device is still being handled specially in that its configuration comes from the game
driver structure.  This needs to be harmonised with regular devices.  But that's a job for
another day.
2017-05-22 14:31:40 +10:00
Dirk Best
12bc38285f emupal: Don't hardcode color PROM region name, add error handling 2017-05-21 23:21:15 +02:00
Robbbert
3b3ef88bfe (nw) Removed duplicates from list of approximate software matches. 2017-05-21 23:22:19 +10:00
AJR
092c8be896 RIP timer_pulse (nw) 2017-05-20 20:33:53 -04:00
R. Belmont
e32adb576c Merge pull request #2315 from 057a3dd61f99517a3afea0051a49cb27994f94d/throttle-fix
Fix video_manager::throttle_until_ticks (#2309)
2017-05-20 09:04:28 -04:00
057a3dd61f99517a3afea0051a49cb27994f94d
cb6fc11722 Remove the minimum constraint for sleep, thus avoid choosing a seemingly
arbitrary constant.
2017-05-20 17:56:03 +00:00
AJR
895a27005d Remove unhelpful assert (nw) 2017-05-18 21:51:54 -04:00
Vas Crabb
54f0efa2bd More auxiliary verb stuff:
* -validate complains if device shortnames exceed 32 characters
* -listroms and -verifyroms accept multiple names/patterns
2017-05-18 23:37:30 +10:00
AJR
38a077b1c5 Misc. validation fixes (nw)
- Make single-driver command-line validation work again
- Correct some fruit machine driver classes
- Remove some now-redundant checks related to device name validity (including the slot test, which also made assumptions that some ti99 bus devices now break)
2017-05-18 02:45:59 -04:00
057a3dd61f99517a3afea0051a49cb27994f94d
5b39822103 Relax the threshold to consider an oversleep as a system time change,
in case of running on a heavily loaded system, as suggested by cuavas.
2017-05-18 04:09:47 +00:00
057a3dd61f99517a3afea0051a49cb27994f94d
b6625b4104 Fix video_manager::throttle_until_ticks (#2309)
Do not update m_average_oversleep if we overslept too much.
This is still a partial fix, more investigation is needed when the system time jumps backward.
2017-05-17 13:11:53 +00:00
Miodrag Milanovic
21f7c8423f Fix obvious bugs found by GCC 7.1 (nw) 2017-05-15 17:38:50 +02:00
Vas Crabb
0f0d39ef81 Move static data out of devices into the device types. This is a significant change, so please pay attention.
The core changes are:
* Short name, full name and source file are no longer members of device_t, they are part of the device type
* MACHINE_COFIG_START no longer needs a driver class
* MACHINE_CONFIG_DERIVED_CLASS is no longer necessary
* Specify the state class you want in the GAME/COMP/CONS line
* The compiler will work out the base class where the driver init member is declared
* There is one static device type object per driver rather than one per machine configuration

Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type.
* DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders.
* DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type.

Use  DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types.
* These macros declare storage for the static data, and instantiate the device type and device finder templates.

The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate.

Things I've actually messed with substantially:
* More descriptive names for a lot of devices
* Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes
* Changed DECO BSMT2000 ready callback into a device delegate
* Untangled Microprose 3D noise from driver state
* Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices
* Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly
* Started to break out common parts of Samsung ARM SoC devices
* Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++
* Tried to make Z180 table allocation/setup a bit safer
* Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant
* Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size
* Imporved encapsulation of Z80DART channels
* Refactored the SPC7110 bit table generator loop to make it more readable
* Added wrappers for SNES PPU operations so members can be made protected
* Factored out some boilerplate for YM chips with PSG
* toaplan2 gfx
* stic/intv resolution
* Video System video
* Out Run/Y-board sprite alignment
* GIC video hookup
* Amstrad CPC ROM box members
* IQ151 ROM cart region
* MSX cart IRQ callback resolution time
* SMS passthrough control devices starting subslots

I've smoke-tested several drivers, but I've probably missed something.  Things I've missed will likely blow up spectacularly with failure to bind errors and the like.  Let me know if there's more subtle breakage (could have happened in FM or Voodoo).

And can everyone please, please try to keep stuff clean.  In particular, please stop polluting the global namespace.  Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros.
It feels like an uphill battle trying to get this stuff under control while more of it's added.
2017-05-14 21:44:11 +10:00
AJR
fa514ee347 Copy longname, manufacturer, year, filetype, etc. for image info in all softlisted cases 2017-05-10 16:41:20 -04:00
Nathan Woods
c5ef33acdc Refactoring/cleanup to state load/save handling
- Changed running_machine::schedule_[load|save]() to take 'std::string &&' instead of 'const char *'
- Changed running_machine::saveload_schedule to be 'enum class'
2017-05-10 10:04:10 +10:00
Nathan Woods
1a8a7c810d Cleanups to src/frontend/mame/ui/slotopt.[cpp|h]
Did the following:
  1.  Polished up residual traces of this code's pre-C++ heritage
  2.  Moved completely private code to an anonymous namespace
  3.  Created device_slot_interface::slot_name() to wrap the pattern of taking the tag and removing the initial colon
2017-05-08 18:11:39 +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
AJR
f4fb3436fe This is now totally fatal, so use a proper error message (nw) 2017-05-06 01:15:59 -04:00
Ted Green
c61e1ba31a Check for callback name being a null pointer before sending it to %s. (nw) 2017-05-05 10:55:46 -06: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
R. Belmont
5afc563c3a Merge pull request #2072 from startaq/tilemap_category
UI: Add the ability to select different tilemap categories
2017-05-04 10:44:25 -04:00
Nathan Woods
e38d3fb15d Fixed a crash in the 'symlist' debugger command (MT#6575) 2017-05-03 09:06:27 -04:00
Justin Kerk
aba51822ee Fixed issue with the Emscripten port where the emulation would continue to run while paused. [Steven Hugg] 2017-05-03 03:09:39 +00:00
AJR
5a1b1f94ac xtal.h: Comment update (nw) 2017-05-02 20:10:03 -04:00
R. Belmont
d589419a5c Merge pull request #2249 from ajrhacker/clock_update
Mechanism for devices to generate clocks for other devices
2017-05-02 16:55:57 -04:00
Nathan Woods
0514442753 Fixed an issue that could cause problems when loading reset_on_load devices (like cartridges) from softlists at runtime
This was not guaranteed to cause a problem; the specific issue here was reported by mr_gw in the context of the CoCo, and the proximate issue (hanging) was in CoCo-specific code.   That said, this could cause problems elsewhere.
2017-04-30 20:03:41 +10:00
AJR
902d2d924b NPOT subunit compromise (nw)
Handlers with a non-power-of-2 number of subunits are allowed once again. However, the offset multiplier will be rounded up to the nearest power of 2.
2017-04-28 12:23:49 -04:00
AJR
659eefe592 Perform unitmask checking during validation in non-debug builds (nw) 2017-04-26 12:51:44 -04:00
Vas Crabb
dac6dc4f62 srcclean (nw) 2017-04-23 12:27:42 +10:00