Commit Graph

13294 Commits

Author SHA1 Message Date
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
AJR
a0bf95bc4d Defend clocks_to_attotime and attotime_to_clocks against the possibility of the device clock being 0 (nw) 2017-04-21 14:52:45 -04:00
AJR
9f12134990 Mechanism for devices to generate clocks for other devices
- Have set_unscaled_clock and set_clock_scale not call notify_clock_changed unless the device has been started.
- Owner-derived clocks are now updated whenever the owner's clock is changed, including at configuration time. This simplifies the configuration of various NES clones.
- Add clock_update_delegate type to represent device-generated clock outputs that may be dynamically modified. The model implementation of this is the CLK output in I8085A.
2017-04-21 14:52:36 -04:00
npwoods
532f4ec861 Workaround for issue where the cannonical instance_name for a device was lost (#2248)
This is a hack; details are in the source code.  I felt that it was too late in the 0.185 release cycle to do anything intrusive.  I intend to fix this "for real" when image/slot option morphing is encapsulated within emu_options.
2017-04-21 18:55:28 +02:00
npwoods
8bd25ca793 Workaround for sibling disk image loading issue (#2246)
Gory details in the comments
2017-04-19 15:03:45 +02:00
npwoods
87640fcc1c Workaround for scenarios where both the command line and an INI specify an image option (#2245)
This is a hack; see commentary within the code.  I intend to fix this "for real" when emu_options become more self contained
2017-04-19 14:19:26 +02:00
npwoods
fb7dd27728 Fixed an issue where reset_on_load images would not properly persist across emulation sessions (#2244) 2017-04-19 14:19:17 +02:00
npwoods
69d9706616 Made a number of device_image_interface members private (#2227)
* Made a number of device_image_interface members private

This also fixes a number of get_default_card_software() implementations that were accessing m_file incorrectly

* Remove duplicate prototype
2017-04-17 11:44:46 +02:00
ajrhacker
b2e89fd2e1 Merge pull request #2239 from ajrhacker/dipalette_sanity
dipalette: A return to sanity (nw)
2017-04-16 21:05:01 -04:00
AJR
dfdd5be76c Disallow a negative number of palette entries by changing some types (nw) 2017-04-16 18:39:18 -04:00
AJR
ed4926d534 dipalette: A return to sanity (nw)
* Revert entries(), indirect_entries(), shadows_enabled() and hilights_enabled() to return the configuration parameters instead of accessing the live state. The thought behind the implementation change was that palette devices could potentially determine the number of entries from the sizes of devfind objects. The regressions caused by this have been worked around, but it was probably a bad idea in the first place.
* Zero-entry palettes are no longer valid. The code that tried to support them was basically left over from when every running machine had a single global palette.
2017-04-16 17:25:08 -04:00
Nathan Woods
c108986639 More options refactoring
This should address outstanding concerns with PR#2231.  I'm trying to turn emu_options into a self contained structure that encapsulates behaviors related to options, including the gymnastics pertaining to image/slot loading and interactions with get_default_card_software() and "just works".

When the MAME 0.186 development cycle starts up, I hope to take this further.  I want to make core_options::entry an abstract base class so that the entries associated with image options and slot options can derive from it.  This will eliminate the current need for emu_options to directly expose maps for image and slot options.

For now, I'm in stabilization mode, and I hope to get things working for a stable 0.185 release.
2017-04-16 13:08:57 -04:00
npwoods
f81389dcfa Changed validity_checker to keep a fresh emu_options for validation purposes (#2232)
* Changed validity_checker to keep a fresh emu_options for validation purposes

This seems to solve the performance problems introduced by PR#2221 while keeping with that PR's goals of not using the "runtime" emu_options for purposes of validation.

* Sorry, I can't spell apparently...
2017-04-15 22:33:05 +02:00
npwoods
02ea4fd43c Fixes issues specifying image/slot options fron INI files (reported by Robbbert) (#2231)
This fix really doesn't go far enough.  I added hooks so that options specified at the command line can also be responded to when parsed from INI files, but in the long run much of the logic that is currently in mame_options should go into emu_options so that when an option is specified, all of the wacko logic around slot/image specification "just works" because it is encapsulated within emu_options.

We have a release 11 days away; I want to be in stabilization mode.
2017-04-15 22:32:12 +02:00
AJR
445858d683 i8251: Improve logging; restrict external command_w and mode_w access to V53 variant (nw) 2017-04-15 15:43:04 -04:00
AJR
98bf2ac8a0 xtal.h: Correction and addition (nw) 2017-04-14 10:57:10 -04:00
R. Belmont
f2accb7bd7 Merge pull request #2221 from npwoods/validation_has_own_options
Changed the validity checks to have its own emu_options
2017-04-14 07:30:12 -04:00
R. Belmont
30d0aec661 Merge pull request #2223 from npwoods/get_default_card_software
Changes to make get_default_card_software() less stupid
2017-04-14 07:29:52 -04:00
AJR
18bf62d621 Move "optional" basemem and extmem arrays out of tilemap_t (nw)
This is intended as a first step towards divorcing tilemap_t and tilemap_device.
2017-04-11 23:40:30 -04:00
Nathan Woods
afa6a83728 Changes to make get_default_card_software() less stupid
The goals with this change is to make get_default_card_software() a bit more standalone by making it a const method that does not mutate the state of the device_image_interface.  This is done by passing in a small structure that encapsulates the minimum of information that get_default_card_software() needs.

This also eliminates the need for device_image_interface::open_image_file()

I agree with Sarayan that get_default_card_software() is terrible and needs to ultimately go away.  This is a small step in that direction.

Lastly, I don't care for the name of get_default_card_software_hook (or get_default_card_software() for that matter).  If anybody has better ideas, let me know.
2017-04-10 20:47:40 -04:00
Nathan Woods
00bcf9e35c Changed the validity checks to have its own emu_options
This comes from a regression reported by Tafoid whereby the following command line:

	mame coco wildcat

Would report the following error (which was not really fatal because it happened within validation):

	Driver t4426 (file coco12.cpp): 1 errors, 0 warnings
	Errors:
		Fatal error Unknown slot option 'pak' in slot 'ext'

My changes to option processing changed emu_options to put image and slot options in their own arrays, and I expect those image/slot options to be pertinent to the active driver.  However, driver validation was passing the emu_options associated with the main emulation  to validation specific maching_config for other drivers.  This changes validate_one() to always use a fresh emu_options with each individual validation.
2017-04-09 08:18:41 -04:00
npwoods
a334ce66be Fixed some regressions introduced in my recent refactoring related to software lists (#2217)
This fixes crashes invoked by the following command lines

	mame nes zelda
	mame gamate cubeup

These had two independent causes.  The first crash was a consequence of open_image_file() doing something inappropriate required by implementations of get_default_card_software().  The second crash was a failure to access image options moved outside the core_options structure.
2017-04-08 22:59:25 +02:00
Nathan Woods
c54d832ef8 Fixed a pedantic MSVC warning in dipalette.h 2017-04-06 20:51:24 -04:00
AJR
cb68159154 Palette device fixes (nw)
- Enforce dependencies in various Konami, Sega & Seta GFX devices
- Disable palette uniqueness check in divideo
2017-04-06 18:00:43 -04:00
AJR
8fe18e9ecc New device interface for palettes
- Create device_palette_interface, which takes over most functionality from palette_device except for the initialization/decoding routines and RAM interface.
- Update screen_device and device_gfx_interface to use a device_palette_interface object rather than a palette_device. This necessitates slight alterations to a few drivers and devices.
- Modify v9938 and v9958 to use the new device_palette_interface rather than a subdevice. This entails breaking a cyclic dependency between device_video_interface and screen_device for this case.
2017-04-06 11:30:40 +10:00
Nathan Woods
fbb7d927d3 Refactoring in response to MT#6531
Prior to this change, options for images and slots were stored in the emu_options collection.  Anything that might restart the emulation (such as slot changes and images that reset on load) had to manipulate the emu_options structure directly.  The dynamic nature of images and slots meant that some elaborate conventions for setting up this collection had to be understood by clients.

After this change, emu_options has two new members (image_options and slot_options) that expose image and slot selections via an std::map.  Anything that changes images or slots in a fashion that needs to persist across sessions needs to modify these data structures.  Additionally, some of the hairly logic (e.g. - get_default_card_software) now records its data here rather than trying to subvert the core_options system.

This is how MT#6531 was fixed; now when diimage.cpp sees an image that resets on load, it just modifies the image_options structure and forces a reset.  This allowed some further cleanups to happen within diimage.

This should be considered a very risky change, and scrutiny/feedback is welcome.  In particular, there seems to be functionality surrounding device bioses that I'm not 100% sure how it works; the syntax seems to imply that it only works on slot devices.
2017-04-06 11:20:45 +10:00
Nathan Woods
694a781215 Changed a lookup within the softlist code to use std::find_if() 2017-04-06 11:19:55 +10:00
AJR
78343b2786 Finish removing direct_update from the core (nw) 2017-04-01 18:20:50 -04:00
arbee
9c963f9b53 New games added as GAME_NOT_WORKING:
Pirate Ship [Phil Bennett, R. Belmont, (dump credits?)]
2017-04-01 16:53:24 -04:00
Olivier Galibert
5769f31c7d This is Sparta ! 2017-04-01 22:39:35 +02:00
AJR
f7819c81c9 Rename the write-only -printer image instance type to -printout. The former option name conflicts with RS232 printer ports in several drivers. 2017-03-31 02:15:36 -04:00
AJR
01c732defa isa8_device: Provide proper unitmask for address spaces of any data width (nw)
screen_device: Guard against assert failure on partial updates starting from incomplete first line (nw)
2017-03-30 01:47:55 -04:00
R. Belmont
d287a4acbf Merge pull request #2168 from Happy-yappH/dasm_virtual_space
Make debugger 'dasm' command able to traverse virtual spaces with
2017-03-29 16:20:32 -04:00
smf-
79f22e060b fix building with MSVC (nw) 2017-03-29 12:13:53 +01:00
Olivier Galibert
365a639ce9 express: More robust parsing fix (nw) 2017-03-27 20:33:02 +02:00
AJR
5002529e04 xtal.h: One more value (nw) 2017-03-26 15:15:45 -04:00
hap
cab410c50d fidelz80: dame sensory challenger skeleton driver (incomplete dump for now, cpu jumps to lalaland) (nw) 2017-03-26 19:55:14 +02:00
AJR
32ee4b4fbe xtal.h: Better and more info (nw)
megaaton: Adjust clocks to conform with schematics (nw)
2017-03-26 11:44:42 -04:00
Olivier Galibert
bf4250e540 disable: Better interface (nw) 2017-03-26 14:52:02 +02:00
Olivier Galibert
b39dcdc613 disable: reverse polarity (nw) 2017-03-26 14:40:16 +02:00
Olivier Galibert
f2aaf2eaa8 express: More robust memory access operator parsing (nw) 2017-03-26 14:08:12 +02:00
PugsyMAME
a97c0fbe87 Fixed writes to decrypted opcode memory [v3] (#2190)
Fixes problem in the debugger and the cheat engine as currently the writes to opcode memory are not handled correctly, so separated EXPSPACE_RAMWRITE and EXPSPACE_OPCODE case statements to allow opcode writes to access the correct memory.

Example:
In flicky this will now disable cat collisions with the main sprite:
maincpu.ob@3ac6=c3

This is the simplest way of updating this, EXPSPACE_OPCODE is now a copy of EXPSPACE_RAMWRITE except it uses AS_DECRYPTED_OPCODES instead of AS_PROGRAM. This method means I've got a lot of work updating a lot of cheat file warnings ...but this is the correct way of doing this.
2017-03-26 13:10:16 +02:00
Vas Crabb
6cb38b0771 srcclean (nw) 2017-03-26 12:57:49 +11:00
AJR
323eb04ded Memory unit masking and address mirroring fixes (nw)
- Fix a bug which effectively treated AM_MIRROR as AM_SELECT when applied to a single-address range mirrored into a contiguous block. The automatic expansion of zero address masks now only applies to those stemming from (default) configuration, not from optimization. (This allows the assertion in latch8_device to be reinstated.)
- Fix a bug where AM_SELECT applied to narrow-width handlers with a submaximal number of subunits would select the wrong address bits or none at all. (This allows rpunch_gga_w to be WRITE8 as intended.)
- Add more stringent appropriateness checking of unit masks for narrow-width handlers.
2017-03-25 17:35:45 -04:00
Olivier Galibert
7d8c0a8d04 Revert "Fixed writes to decrypted opcode memory" (#2185) 2017-03-24 23:58:17 +01:00
PugsyMAME
3589a77cae Fixed writes to decrypted opcode memory
Fixes problem in the debugger and the cheat engine as currently the writes to opcode memory are not handled correctly, so separated EXPSPACE_RAMWRITE and EXPSPACE_OPCODE case statements to allow opcode writes to access the correct memory.

Example:
In flicky this will now disable cat collisions with the main sprite:
maincpu.ob@3ac6=c3
2017-03-24 19:09:53 +00:00
Olivier Galibert
5a70b70132 Add missing disable_side_effect in find_pc_backwards (nw) 2017-03-20 21:04:00 +01:00
Nathan Woods
bcd35f9fd7 Fixed regression when loading multipart softlists
Pernod found a regression introduced in the 0.183 softlist refactoring whereby multi-part softlist items would not distribute to multiple slots.  The problem was that the old code was relying on the image slots being loaded into the core.  This is not the way the new system works, so I've added a hook into software_list_device::find_mountable_image() that allows the new approach to work.
2017-03-20 23:17:15 +11:00
Happy
1a65879da1 Make debugger 'dasm' command able to traverse virtual spaces with
unmapped holes.

Previously, 'dasm' would enter an infinite loop if it hit an
unmapped pc, continuing to grow the output file until the program
was killed.
2017-03-19 22:26:37 -06:00
Miodrag Milanovic
ad2bedf06b Refactored HTTP handling to be easier to extend and use (nw) 2017-03-19 18:35:05 +01:00
R. Belmont
49a67f2eea Merge pull request #2155 from shattered/_9330d35
debugger: print octal addresses in the trace if CPU is octal.
2017-03-19 08:40:08 -04:00
ajrhacker
1265aae040 Merge pull request #2154 from shattered/_b85368c
hp_ipc: de-skeletonize.
2017-03-16 23:35:15 -04:00
Sergey Svishchev
c2817ded96 debugger: print octal addresses in the trace if CPU is octal. 2017-03-16 22:34:04 +03:00
Sergey Svishchev
7d4d6382e7 hp_ipc: de-skeletonize. 2017-03-16 22:26:49 +03:00
Sergey Svishchev
7f12847c28 agat: split from apple2, implement basic agat7 hardware (take 2). 2017-03-16 18:16:52 +03:00
hap
7f5c0d8703 fix compile (nw) 2017-03-15 16:57:45 +01:00
R. Belmont
5accd8ef2d Merge pull request #2128 from ajrhacker/screen_vblank_devcb
Convert screen_device VBLANK callback to devcb_write_line
2017-03-15 10:50:24 -04:00
Sergey Svishchev
8fd315da7e eurocom2, waveterm: new skeleton drivers (Eltec EurocomII SBC, PPG Waveterm A) 2017-03-12 17:17:06 +03:00
AJR
b888b8c4ed Convert screen_device VBLANK callback to devcb_write_line
- WRITE_LINE callback has same functionality, except that screen is not an argument
- Rename screen_eof_xxx to screen_vblank_xxx in many drivers
- No changes to externally registered vblank delegates or screen update methods
2017-03-10 21:35:02 -05:00
Nathan Woods
3a3520e916 Adds a new addrmap.cpp validation intended to catch AM_REGION declarations not tied to anything meaningful 2017-03-09 06:26:08 -05:00
Sergey Svishchev
9d78882e74 a7150: de-skeletonize. 2017-03-08 10:49:03 +11:00
npwoods
a011e3a22e Changed a few more 'const char *' ==> 'const std::string &' (#2111) 2017-03-04 16:00:18 -05:00
ajrhacker
64636a1583 Merge pull request #2114 from npwoods/fix_more
Fixed a few more issues broken similarly to 'bpset'
2017-03-03 20:30:11 -05:00
Nathan Woods
234ad468eb Fixed a few more issues broken similarly to 'bpset' 2017-03-03 19:41:46 -05:00
Nathan Woods
4484da457e Fixing stupid error in the bpset command 2017-03-03 19:30:13 -05:00
Nathan Woods
60b8e27e2c C++-ification of debugger code (misc std::string/std::vector adoption mainly) 2017-03-03 10:36:30 -05:00
Vas Crabb
3ecdaafea6 clean up a few more device issues, add basic device validation 2017-03-03 21:25:16 +11:00
AJR
4ed7fbda11 Make device_image_interface::update_names a private method called automatically at config_complete time (nw) 2017-03-03 00:11:09 -05:00
AJR
7e9e3f5b4d Fix debug build by removing vestiges of -dummywrite (nw) 2017-03-02 23:15:00 -05:00
Vas Crabb
28596c7161 fix crash on excessive command-line options, clean up some tabulation, remove long-dead option 2017-03-03 14:18:58 +11:00
AJR
3ad77eae8a Image instance name refactoring and bug fixing (nw)
- update_names no longer takes arguments; the device type can be obtained easily, and the custom instance names are now overrides. Devices might not need to explicitly call update_names in the future.
- Fix the frontend crash/assert failure resulting from instance names not being generated properly.
2017-03-02 20:01:17 -05:00
AJR
e27a978955 No, Vas, defaulting the constructor won't do here (nw) 2017-03-02 19:09:03 -05:00
Vas Crabb
c92454b8cd fix assumption that device being described is root device (fixes sampleof=005 reported on all devices) 2017-03-03 10:24:30 +11:00
Olivier Galibert
0cdc64d36c debugger_access: Refactor [O. Galibert] 2017-03-02 22:51:59 +01:00
AJR
eb49d890aa Fix clang build by supplying constructor for device_registrar (nw) 2017-03-02 09:36:34 -05:00
Vas Crabb
6a7484db95 fix for libc++ build (nw) 2017-03-03 00:54:48 +11:00
Vas Crabb
aa739563d1 Self-registering devices.
* MAME now walks all devices when generating -lx output irrespective of whether they're actually instantiated anywhere or not.
* -lx is at least 30% faster than previous implementation.
* Only possible drawback is that filtering drivers no longer filters devices.
2017-03-03 00:45:14 +11:00
Vas Crabb
d4f8abf043 fix gcc link error (nw) 2017-02-27 23:39:05 +11:00
Vas Crabb
93a1a444d2 more workaround (nw) 2017-02-27 23:21:30 +11:00
Vas Crabb
6c23897483 Self-registering devices prep:
* Make device_creator a variable template and get rid of the ampersands
* Remove screen.h and speaker.h from emu.h and add where necessary
* Centralise instantiations of screen and speaker finder templates
* Add/standardise #include guards in many hearers
* Remove many redundant #includes
* Order #includesr to help catch headers that can't be #included alone

(nw) This changes #include order to be prefix, unit header if applicable
then other stuff roughly in order from most dependent to least dependent
library.  This helps catch headers that don't #include things that they
use.
2017-02-27 22:57:14 +11:00
AJR
2a89da877b device_image_interface cleanups (nw)
- Replace comparisons of software_entry() or part_entry() with nullptr with loaded_through_softlist() predicate.
- Eliminate the superfluous m_software_info_ptr member. The software_entry() accessor is still provided, but now rarely used.
- Eliminate two of the three arguments to load_software_part.
- Remove some unnecessary auto-typing in ui/inifile.cpp.
2017-02-27 00:38:50 -05:00
Nathan Woods
f407afa013 Cleanup of slot code
Added device_slot_interface::has_selectable_options() to calculate whether a particular slot has selectable options
2017-02-26 21:19:59 -05:00
Robbbert
19f34d9cf8 (nw)This should fix MT 06107 but there's plenty of time for testing. 2017-02-27 11:20:38 +11:00
PugsyMAME
246b98a3c0 Update machine.cpp 2017-02-25 17:23:22 +00:00
PugsyMAME
ae62706092 Update main.h 2017-02-25 17:23:22 +00:00
Vas Crabb
55e5e6992b don't assume thread is always started (nw) 2017-02-24 10:07:32 +11:00
Nathan Woods
8c53c1438e Fixed an issue where device options (e.g. -cart) were reported as unknown when they actually worked
This change also changes around how command line arguments are passed around; specifically I changed argc/argv to be std::vector<std::string>

Note this is not passed around 'const', the reason being that the command line processing will now "eat" the vector
2017-02-22 23:13:41 -05:00
npwoods
709c330a1f Softlist cleanup (#2075)
* Eliminates the need for emu_options::update_cached_options() by providing a hook for when option values change

* This is a preliminary fix to the issue identified in PR#2065

* More softlist related refactoring:
  - We now only parse the command line (with core_options::parse_command_line()) once
  - Options that are set up during slot and image setup go through a 'value_specifier' function
  - Eliminated the command line postprocessing
2017-02-22 23:16:23 +11:00
Vas Crabb
bc1065a311 Revert "Make "requirement" field in softlists actually work (MT 6464)"
This reverts commit 17af0f9c66.
2017-02-19 11:40:54 +11:00
Dirk Best
4091898097 UI: Add the ability to select different tilemap categories
This allows you to select different tilemap categories in the
built-in tilemap viewer. The default is to render all categories
(same as before), but you can select to render only a specific
tilemap category with the PAGE_UP and PAGE_DOWN keys.
2017-02-18 15:22:25 +01:00
Vas Crabb
fb087b6c92 Cherry-pick some features from self-registering drivers PoC:
* Use size_t for sizes and <algorithm> for algorithms
* Fix up some files that were getting linked into multiple libs
* Add missing virtual method to sh2 peripheral class
* Put shortname in driver struct for locality
* Use shared pointers in config LRU cache for safety
2017-02-16 12:20:35 +11:00
mahlemiut
6ed0bad7f8 Revert "ioport: driver shortname in the INP file header should be 16 characters"
This reverts commit f33e0ca126.
2017-02-16 14:19:38 +13:00
mahlemiut
f33e0ca126 ioport: driver shortname in the INP file header should be 16 characters 2017-02-16 13:20:23 +13:00
Nigel Barnes
080a944190 allow softlist software parts to use different interfaces:
- imgcntrl: don't assume first software part, find part with correct interface
- swlist: check all software parts for matching interface when populating list of software lists
- softlist_dev: check all software parts when finding approx matches
2017-02-15 11:15:28 +00:00
Miodrag Milanovic
f8dbe6a15b cleanup headers of not used friend classes (nw) 2017-02-12 10:27:30 +01:00
AJR
269c4c7410 Fix OS X build (nw) 2017-02-11 13:32:42 -05:00
Olivier Galibert
a2557f1b02 Remove emu.h from headers (nw)
Per Vas' request.  If the compile fails for you (i'm thinking osx and
windows native debuggers here in particular), add '#include "emu.h"'
as first include of the cpp files that fail.

Due to our use of precompilation and forced inclusion, emu.h must be
included as the very first non-comment thing we do if we want to be
sure msvc compiles are identical to gcc/clang ones.  Doing it directly
instead of through an include increases the correctness probability by
a magnitude.
2017-02-11 18:31:20 +01:00
Vas Crabb
17a597434a a bit more readable (nw) 2017-02-10 18:02:51 +11:00
Vas Crabb
c64245653f make object finder arrays meet more Container/Sequence requirements (allows range-based for and many algorithms to work) 2017-02-08 17:40:36 +11:00
Vas Crabb
fb8b69545f Amiga keyboard updates:
* Fixed Shift-Alt combinations with natural keyboard
* Fixed crash on keyboard inputs with four characters
* Corrected polarity of KB_DATA from Amiga to keyboard
* Completely rewrote 68HC05CxA-based A1200 keyboard device, now working
* Fixed KB_DATA mixing in A500 keyboard
* Made A500 keyboard caps lock LED output name consistent with A1200
* Added Alt- and Alt-Shift- characters to A500 US keyboard
* Fixed natural keyboard modifiers with LLE keyboards
2017-02-05 12:04:35 +11:00
Vas Crabb
0f929b4213 Make debugger fall back from binary to default base on 0b prefix
* This makes expressions like 0B12 parse as hex in hex memory spaces
* Where there's ambiguity (e.g 0B01) binary takes precedence
2017-02-03 09:30:06 +11:00
Vas Crabb
edf64df1db srcclean (nw) 2017-01-22 15:37:37 +11:00
Vas Crabb
31ae79c107 need LOG_GENERAL before VERBOSE (nw) 2017-01-21 10:20:34 +11:00
Vas Crabb
59ed49f709 Help me template compiler! You are my only hope!
6805 cleanup:
* Reduce massive amounts of redundancy by templating opcode handlers
* Replace the epic switch statement with a dispatch table
* Fix timings for a few instructions
2017-01-20 22:13:25 +11:00
Vas Crabb
19a9122748 add logmacro.h inspired by Edstrom's log macros
* should be #included after other headers and after optionally #defining VERBOSE
* usage samples in z80scc.cpp and m68705.cpp

68705: add lots of logging to help trace issues
2017-01-20 16:53:12 +11:00
R. Belmont
9d6a96e02f Merge pull request #1987 from npwoods/tracesym_debugger_command
Created a new debugger command 'tracesym'
2017-01-17 12:21:57 -05:00
Nathan Woods
e5d662adf7 Augmenting help file 2017-01-16 20:24:27 -05:00
Nathan Woods
b8453021df Added a facility to allow logerror output to reside in traces
As a consequence, the debugger 'trace' command was changed so that the third parameter is a list of '|' delimited options
2017-01-16 20:13:03 -05:00
Nathan Woods
d8d82358c3 Augmenting help file 2017-01-16 20:07:50 -05:00
Nathan Woods
46b62fb194 Created a new debugger command 'tracesym'
'tracesym' is intended to be a shorthand of 'tracelog', whereby the user doesn't have to specify a format string; the default format string is used
2017-01-15 16:19:03 -05:00
Nathan Woods
3b55bebadc Removing unnecessary callback
I'm doing this in response to a compilation error on MSVC 2015.  As far as I can tell, this is a bug in the compiler.  My basis for asserting this is that placing the following declaration within the 'endpoint.on_open = <<lambda>>' gives the same compilation error:

	const std::function<void(void)> mycallback = [](void) {};

Whereas moving that logic outside of the 'endpoint.on_open = <<lambda>>' does not give an error.

Normally I don't like working around buggy compilers, but in this case the callback is supposed to be optional anyways.
2017-01-15 11:55:33 -05:00
AJR
17af0f9c66 Make "requirement" field in softlists actually work (MT 6464)
(nw) MAME's architecture for software loading remains gruesomely overcomplicated, and this makes it even less efficient than it already was. However, I think more invasive cleanups would best be left until later.
2017-01-11 13:00:41 -05:00
Vas Crabb
c9647f6e28 debugger: use 0o for octal prefix, and add support for binary with 0b a la C++, also support uppercase radix speifier 2017-01-06 15:37:43 +11:00
R. Belmont
2c7ab7fe83 Merge pull request #980 from shattered/_ad3979c
debugger: parse octal expressions (prefixed by '0')
2017-01-05 15:18:42 -05:00
Miodrag Milanovic
b5df96fd37 Fix issue enabling/disabling http (nw) 2017-01-04 19:42:13 +01:00
Miodrag Milanovic
74b24ecefb Added websockets as well (nw) 2017-01-04 19:22:13 +01:00
Miodrag Milanovic
7119f5ba73 One more fix (nw) 2017-01-04 16:23:47 +01:00
Miodrag Milanovic
0c44c4c766 Fix non-VS build (nw) 2017-01-04 16:18:38 +01:00
Miodrag Milanovic
63e3f48775 Added initial HTTP/HTTPS webserver/websocket server support (nw) 2017-01-04 16:15:57 +01:00
AJR
e624a3cd38 Service mode DIP switch adjustments
- Changed how input sequences are assigned to service mode DIP switches. The frontend now assigns them the default sequence for the non-toggle service mode/test switch (not necessarily the F2 key, the previously hardcoded default) unless the machine happens to have one of those as well (as is somewhat common with gambling games).
- All DIP and configuration switches are automatically defined as toggle fields to make assigning input codes to them easier.
2017-01-02 21:39:49 -05:00
AJR
dd1d40b9fd Fix for a potential problem if natural keyboard input gets disabled while machine is running (nw) 2016-12-31 17:11:10 -05:00
AJR
9558460b68 Correct natural keyboard handling of toggle keys 2016-12-31 17:02:20 -05:00
AJR
67df9e6432 Address map fixes (nw)
- tms32025: Correct space of internal data maps
- mc1000: Separate out opcodes map
- addrmap.cpp: Replace a few debug asserts with friendlier error messages (makes validation less dangerous in debug builds)
2016-12-25 01:13:44 -05:00
AJR
ff68193741 Overhaul of devcb (nw)
- Allow stringing multiple callbacks together recursively. Chained callbacks will be read or written in sequence, and each can be configured with its own type and mask/shift/XOR parameters.
- Chained input callbacks cannot have overlapping masks (there's no such thing as a free multiplex). Chained output callbacks have no such restriction.
- Remove the constant parameter for the LOGGER callback type: it makes no sense for output, was always zero in existing usage, and is now unnecessary with callback chaining.
- Change LOGGER behavior for writes to log the user-defined message only if the output as masked is nonzero. With callback chaining, this can be used to monitor when individual bits become active.
- Constant read callbacks can no longer have MCFG_DEVCB_XOR or MCFG_DEVCB_INVERT specified (makes no sense in this context).
- Add a MEMBANK callback type to allow output bits to be used for bank-switching.
- Add ASSERTLINE and CLEARLINE callback types that raise or lower an interrupt line if the selected bit of the written value is active. These are intended for where periodic or ready-pulse signals from devices are used to trigger IRQs that the CPU program will independently acknowledge.
- Add MCFG_DEVCB_BIT as shorthand for masking and shifting out an individual bit for a callback.
- Removed DEVCB_LINE_DISPATCH_<n>. Where we're going, we don't need line dispatcher devices.

The incompatibility of compilers with regard to post-C90 printf string formats is shockingly bad. There seems to be no easy way to format a 64-bit value and please both gcc and clang, let alone MSVC.
2016-12-21 15:20:54 -05:00
Vas Crabb
be26ac9abf coretmpl: add an associative LRU cache with map-like behaviour
selmenu: use LRU cache so icons don't all need to be reloaded on scroll

uismall.bdf: set default character for missing glyphs

rendfont.cpp:
* encapsulate many BDF and BDC handling details
* make file I/O 64-bit clean, check for allocation errors
* more solid BDF parser with error messages and trace logging
* fix heap smash when building bitmaps for BDF fonts
* extend BDC format to support high planes and default character
* render default character if glyph not found for BDF/BDC
2016-12-15 17:00:34 +11:00
Vas Crabb
c8f1954467 XML refactoring:
* move stuff to namespace util::xml
* scope down some enums
* split config load/save delegate types
* make config load take const so it can't mangle data
2016-12-11 18:15:41 +11:00
Olivier Galibert
998e196d55 dimemory: Remove the magic bypass [O. Galibert] 2016-12-10 13:40:26 +01:00
Vas Crabb
d44a1ac1fa Merge pull request #1804 from bradhugh/autorepeat_fix
Double-check key state before UI autorepeat. Fixes #1169
2016-12-10 14:49:49 +11:00
Olivier Galibert
7f0ba30ec5 sharc: Use standard memory maps [O. Galibert] 2016-12-09 20:11:33 +01:00
Brad Hughes
22397e0c5d Double-check key state before UI autorepeat. Fixes #1169 2016-12-06 09:02:20 -05:00
AJR
f050607f8e One more command that lacked an 'o' version (nw) 2016-12-02 05:39:22 -05:00
AJR
ff4f03694f Add 'o' variants to memory debugging commands to request decrypted opcodes space 2016-12-01 21:11:35 -05:00
Joakim Larsson Edstrom
3812a7c586 WIP: Apple Laser Writer II NT skeleton driver added [LN, Edstrom] 2016-11-30 17:31:54 +01:00
Vas Crabb
7238415d1f srcclean (nw) 2016-11-27 09:56:49 +11:00
R. Belmont
cb248419ca Merge pull request #1777 from ajrhacker/sei80bu
Move SEI80BU encryption out of the SEIBU_SOUND device and make it a d…
2016-11-26 09:16:44 -05:00
Vas Crabb
3bffc041c5 Quick fix for symptom of #1778 but doesn't address how it decided the joystick component was unknown to begin with 2016-11-26 15:59:30 +11:00
AJR
4c9814ab30 Move SEI80BU encryption out of the SEIBU_SOUND device and make it a device of its own
Add MCFG_DEVICE_ROM to override region tag for device_rom_interface (nw)
2016-11-25 17:47:10 -05:00
Scott Stone
30cda1d3e5 A round of spelling/typographical fixes to source comments (nw) 2016-11-24 09:24:01 -05:00
Miodrag Milanovic
ee8580bb79 We do not use this for some time, since liboptional now contains all devices so no linking issue (nw) 2016-11-23 15:28:10 +01:00
Vas Crabb
b8b0774997 Merge pull request #1317 from npwoods/disasm_stdstring
Refactored device_disasm_interface::disassemble() and dasm_override_delegate to take string buffers as std::string
2016-11-21 11:30:06 +11:00
Nathan Woods
7c868e53d0 Moving disasm.clear()/disasm.seekp(0) out of if statement, so the stream is always reset 2016-11-20 19:18:32 -05:00
Nathan Woods
932f69d6e9 Eliminated 'device_disasm_interface::disassemble(std::string &buffer, ...' 2016-11-20 18:27:25 -05:00
Vas Crabb
c7352f5684 Revert "moved debugger_access() from address space to machine & removed the anti-patterns that updated cascading address spaces. [smf]"
This reverts commit 5f05fbf613.
2016-11-21 05:57:46 +11:00
Nathan Woods
a29891d2e5 Changed disassembler infrastructure to not use char buffers internally 2016-11-20 08:49:30 -05:00
smf-
5f05fbf613 moved debugger_access() from address space to machine & removed the anti-patterns that updated cascading address spaces. [smf] 2016-11-19 22:18:58 +00:00
Olivier Galibert
53df201f32 emucore: Kill generic_ptr [O. Galibert] 2016-11-19 22:59:24 +01:00
smf-
9e93cdcd55 Fix for the nonstandard types when not using the broken precompiled headers. (nw) 2016-11-19 13:19:29 +00:00
Vas Crabb
8179a84458 Introduce u8/u16/u32/u64/s8/s16/s32/s64
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h"
* Get rid of import of cstdint types to global namespace (C99 does this anyway)
* Remove the cstdint types from everything in emu
* Get rid of U64/S64 macros
* Fix a bug in dps16 caused by incorrect use of macro
* Fix debugcon not checking for "do " prefix case-insensitively
* Fix a lot of messed up tabulation
* More constexpr
* Fix up many __names
2016-11-19 05:38:48 +11:00
cracyc
1a9cdb5c7a machine: don't do the periodic_check before every timeslice (nw) 2016-11-17 16:23:40 -06:00
Miodrag Milanovic
79714c47d2 Fix Visual Studio build (nw) 2016-11-16 16:25:17 +01:00
Vas Crabb
2354a42010 Turn xmlfile API into something that looks like C++
It's still a bit quirky but it's far better encapsulated before, and it plays nice with const (nw)
2016-11-17 01:44:03 +11:00
Robbbert
32c554f8da Fixed spelling error (nw) 2016-11-13 11:09:19 +11:00
Miodrag Milanovic
b73126e85a added OPTION_HOMEPATH to point to read/write folder,for now used by LUA scripts (nw)
Copied all needed files so plugins could be started under UWP
2016-11-12 15:27:22 +01:00
Miodrag Milanovic
6b18f90438 Revert "Added IS_ENABLED, so we have compiler check for non used part, it is checked but not compiled in (nw)"
This reverts commit c0407f073b.
2016-11-12 09:12:36 +01:00
Miodrag Milanovic
c0407f073b Added IS_ENABLED, so we have compiler check for non used part, it is checked but not compiled in (nw)
false and true now used instead of integer where used as bool
2016-11-11 18:50:14 +01:00
Vas Crabb
2918d8def4 abuse of auto is bad, mkay? (nw) 2016-11-12 01:54:29 +11:00
smf-
9ff288b3ad removed another root_device/driver_device dependency (nw) 2016-11-10 14:32:51 +00:00
Olivier Galibert
762b6b9793 addrmem: Obvious renames and helpers [O. Galibert] 2016-11-10 10:06:40 +01:00
Olivier Galibert
b8d8a89812 addrmap: Dotify [O. Galibert] 2016-11-10 09:22:06 +01:00
Olivier Galibert
1333280f8a addrmap: Stream it [O. Galibert] 2016-11-10 09:22:06 +01:00
Olivier Galibert
bb7dc53d0a addrmap: Change setters into passthroughs [O. Galibert] 2016-11-09 16:25:43 +01:00
Olivier Galibert
37e5d22fe4 addrmap: Simplify constructor, thanks Micko [O. Galibert] 2016-11-09 15:16:37 +01:00
Olivier Galibert
5799b36a3a addrmap: De-hand-templatize address_map_entry, remove then unneeded entry parameter [O. Galibert] 2016-11-09 14:20:11 +01:00
Olivier Galibert
8536c82ba1 addrmap: Remove device parameter [O. Galibert] 2016-11-09 12:27:40 +01:00
Miodrag Milanovic
2027d59e7f Do not use FUNC in delegate where applicable (nw) 2016-11-06 14:11:55 +01:00
Phil Bennett
fffd464d34 MAMETesters Bugs Fixed:
05928: nbajamex: game crashes / nvram gets corrupted

- Emulated the Acclaim RAX sound board, adding sound to Batman Forever and NBA Jam Extreme [Phil Bennett]

- Hooked up extra NVRAM in NBA Jam Extreme [Phil Bennett]
2016-11-06 00:59:59 -07:00
Miodrag Milanovic
dedf3c9b9d Delegate support for lambdas and std::functions in general, also supporting const members now [Miodrag Milanovic] 2016-11-05 20:26:04 +01:00
Sandro Ronco
a5ce354d16 New Working machine added
-------------------------
Saitek RISC 2500 v1.04 [unknown]
Mephisto Montreux [unknown]
2016-11-03 22:27:33 +01:00
smf-
e125186e15 Moved device_memory_interface from driver_device to dummy_space_device. Exposed the dummy_space_device as machine().dummy_space(), with a trampoline in driver_device for existing callers. Debugger no longer needs to special case root_device() to avoid showing the dummy address space. [smf] 2016-11-03 19:21:20 +00:00
Nathan Woods
9d0f2ae21c Changed disassembler overrides to use 'std::ostream &' internally 2016-10-30 10:49:25 -04:00
R. Belmont
86548bc507 Merge pull request #1557 from ajrhacker/inputdev
Polymorphize input_device and input_class; move to separate source fi…
2016-10-29 20:41:28 -04:00
therealmogminer@gmail.com
8225a140ee -hazeltin: Added preliminary video, still broken due to timing issues. [Ryan Holtz] 2016-10-27 13:46:42 +02:00
therealmogminer@gmail.com
5611934cf2 Not for the release branch: remove all ioport and address map macros from tranz330 driver, just as a test to play around with, (nw) 2016-10-25 13:35:25 +02:00
AJR
99c705f9de Polymorphize input_device and input_class; move to separate source file (nw) 2016-10-24 17:28:35 -04:00
angelosa
3d6c6ff19b Added some system inputs to nightgal.cpp. Worked around MT 06409 (nw)
Fixed Left/Right Sticks for P2 and above (nw)
2016-10-24 03:22:51 +02:00
angelosa
03be2a64c2 Added proper input labels for Vindicators/Vindicators Part II, and make left/right sticks labels explicit so that "Left/Up" isn't upper-right direction but "Left Stick/Up" (nw) 2016-10-24 01:08:19 +02:00
Vas Crabb
129c0feeed srcclean (nw) 2016-10-23 22:36:24 +11:00
Miodrag Milanovic
aa2e6f9df3 Reverting part of changes from previous commits as described in mail on list (nw) 2016-10-23 09:11:47 +02:00
AJR
b83078eb46 Erase bitmap_rgb32::erase (nw) 2016-10-22 22:30:09 -04:00
AJR
7d41a1f619 Improvements to rgb_t (nw)
- Make most class methods constexpr
- Make color constants (white, black, etc.) into constexpr factory methods, in order to fix a static initialization problem discussed on the MAMEWorld forums.
  (Note that while C++14 allows constexpr member variables to be initialized outside classes, current compilers' support for C++14 constexpr rules has proven to be lamentably deficient.)
- Create bitmap_rgb32::erase to simplify syntax in update handlers
2016-10-22 18:45:04 -04:00
Miodrag Milanovic
e42ed88254 there you go (nw) 2016-10-22 21:37:06 +02:00
Miodrag Milanovic
a6bdefec8c more TRUE/FALSE cleanup (nw) 2016-10-22 16:37:12 +02:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
Miodrag Milanovic
2bfd3a6ab2 [[noreturn]] instead of ATTR_NORETURN (nw) 2016-10-22 12:10:50 +02:00
Miodrag Milanovic
23ad94073f use standard types uintptr_t, char16_t and char32_t instead of FPTR, utf16_char, unicode_char (nw) 2016-10-22 11:31:49 +02:00
Miodrag Milanovic
e2f54f5333 Cleanup, TIMER_CALLBACK was only in unused parts (nw) 2016-10-21 16:26:22 +02:00
Miodrag Milanovic
66c56d1c9a use std algo instead of manual setting (nw) 2016-10-21 12:46:54 +02:00
Miodrag Milanovic
d2e8f61149 dynamic_buffer is just std::vector<UINT8> (nw) 2016-10-21 12:35:05 +02:00
Miodrag Milanovic
a291e77b2c some bool <-> int not needed conversions, also cleaned drivenum.* was using memset for clearing vector (nw) 2016-10-21 11:54:18 +02:00
AJR
6d2d6bfa0d Lock out ioport_fields independently of natural keyboard state (nw) 2016-10-20 17:58:03 -04:00
smf-
36944269bd DAC WIP, started documenting the DACs in use. [smf]
ataxx: Fixed missing sound channel caused by one dac not being hooked up and one dac being hooked up to two addresses.
bestbest: Fixed high pitch screech caused by incorrect addressing (two dacs weren't hooked up and two were hooked up to two addresses).
cchasm: Fixed static noise generation caused by feeding the same bit to both dacs.
cheekyms: Slightly improved sound by implementing sound triggers as 8 x 1 bit dacs instead of 1 x 8 bit dac.
galeb: Fixed sound by implementing it according to http://www.deltasoft.com.hr/retro/galebemu.htm & implemented enough of LOAD/SAVE to stop it hanging.
hard drivin: (all games in driver) Improved 12 bit controls, although centre still goes out of sync.
mea8000: Converted to a sound device.
megaphx: Fixed noisy samples due to wrong format.
microvsn: Fixed sound pitch caused by incorrect usage of write_signed8().
seicross: Changed to a 4 bit dac as samples are packed nibble.
spaceg: Preliminary sound using space invaders samples.
suna8: Changed to a 4 bit dac as samples are packed nibble.
vcombat: Fixed static during machine gun fire due to incorrect dc offset removal.
vectrex: Fixed noisy samples due to wrong format.
wheelfir: Fixed sound, eeprom & analogue steering wheel and brake pedal.
2016-10-17 16:04:02 +01:00
AJR
28cc18b698 Add row size as sixth parameter to debug dump command 2016-10-16 11:55:09 -04:00
Nathan Woods
015f5375bf Fixed some Doxy comments, and addressed a few nits 2016-10-15 21:12:13 -04:00
Nathan Woods
57e3c29dd2 [COCO] Changed to use required_ioport_array and optional_ioport
Also, I added a size() accessor to object_array_finder.  If there is a better way to do this, let me know.
2016-10-15 19:20:29 -04:00
Robbbert
e2718c91de Added swpath. Allows users to specify location of loose software. 2016-10-12 19:37:38 +11:00
AJR
0d2d4cab4f Soft resets no longer turn back clocks on devices
device_rtc_interface: Cleanups and refinements (nw)
- Give RTCs their own phase of machine initialization, right after NVRAM loading
- Make RTC feature flag overrides const, including one new one
- Make rtc_clock_updated a required override
2016-10-09 22:04:32 -04:00
AJR
0e55a0bfc0 Misc. keyboard input improvements
- Add BS, Tab, 00, 000 keys common on add-on keypads as input items; SDL may recognize these, but DirectInput does not
- Assign Keypad 00 and Keypad 000 in several drivers' input lists
- Add SDL keycode for "cancel" key
- Add keypad keys as alternates to natural keyboard
- Move has_keyboard() out of the core; enabled() test is unnecessary now that all optional keyboards are slot devices (nw)
2016-10-08 21:13:12 -04:00
smf-
84f4180a43 Fix disassembly window updating when you set pc/curpc on 68000 and z80. Remove masking from sh2 curpc to be consistent with old versions and the pc passed by the interpreter to the hook to be consistent with the drc. (nw) 2016-10-08 18:39:47 +01:00
smf-
48fd80f624 more debug consistency. (nw) 2016-10-05 17:54:28 +01:00
Vas Crabb
a860875217 Merge pull request #1460 from mamedev/machine_flags
Proposal for new system flags for 0.179 dev-cycle:
2016-10-05 21:09:22 +11:00
AJR
f1b0dfe64a Separate natural keyboard support from ioport.cpp (nw) 2016-10-02 00:07:43 -04:00