Commit Graph

1004 Commits

Author SHA1 Message Date
Olivier Galibert
4ea3dde4f3 Misc fixes (nw) 2017-07-03 15:21:44 +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
R. Belmont
10f74bb2fe Merge pull request #2409 from 057a3dd61f99517a3afea0051a49cb27994f94d/sdl-callback-fix
Fix sound_sdl::sdl_callback, fill buffer with silence when underflow.
2017-06-25 07:55:14 -04:00
057a3dd61f99517a3afea0051a49cb27994f94d
9788f622e2 Fix sound_sdl::sdl_callback, fill buffer with silence when underflow.
The problem is most noticeable when you are saving state, and the
save takes a relatively long time, short period of audio gets played
repeatedly, which is usually unpleasant.

I found out it's caused by sdl_sound::sdl_callback not fill the audio
buffer with silence when underflow occurs. According to
https://wiki.libsdl.org/SDL_AudioSpec, if there's nothing to play,
the callback should fill the buffer with silence.

I tested this change and the problem is gone.
2017-06-25 18:28:43 +00: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
npwoods
2af3233101 Changed a few 'const char *' ==> 'const std::string &' in the MAME debugger (#2170) 2017-06-24 09:46:58 +10:00
Robbbert
4ee2d1c7b0 (nw)Windows debugger: removed "Mount Item" for now due to bugs, also removed internal media slots from images menu. 2017-06-24 01:10:44 +10:00
MooglyGuy
0a7da0fb67 -bgfx: Fixed xBR-lv2-multipass shader. [Ryan Holtz] 2017-06-11 19:55:47 +02:00
MooglyGuy
8496545170 -bgfx: Fixed the following xBR shaders: xBR-lv2-fast, xBR-lv2-noblend, xBR-lv2, xBR-lv3-noblend, and xBR-lv3. [Ryan Holtz] 2017-06-10 12:52:17 +02:00
Robbbert
cc9a0e699f Windows debugger: image menu: Mount File/Create default to swpath instead of randomness. 2017-06-01 22:46:39 +10:00
Robbbert
889fff01a2 Windows debugger: image menu: added ability to load software-list items. 2017-06-01 22:09:27 +10:00
Vas Crabb
aaed83a91f scoped enum for Windows (nw) 2017-05-23 15:59:55 +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
MooglyGuy
90d6fe79ce Fixed HQx shaders with BGFX OpenGL backend. Fixes for more shaders seem to be a bit more involved. Will have proper commit message later. (nw) 2017-05-18 00:59:37 +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
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
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
Vas Crabb
2e14f39a07 do variable substitution in bgfx_path #2201 2017-04-23 16:48:52 +10:00
Vas Crabb
dac6dc4f62 srcclean (nw) 2017-04-23 12:27:42 +10:00
Olivier Galibert
2cead2e014 Compile testing anybody? (nw) 2017-02-27 18:15:33 +01:00
Brad Hughes
0505d3c985 Some reports of garbage in console with DInput controllers.
Change to snprintf with assert since apparently snprintf fixes the reported problem.
2017-02-27 11:15:29 -05: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
Miodrag Milanovic
21501824eb Cleanup, we already have NOMINMAX now in scripts (nw) 2017-02-11 19:35:28 +01:00
AJR
269c4c7410 Fix OS X build (nw) 2017-02-11 13:32:42 -05:00
Miodrag Milanovic
aa83c19e77 fix windows compile (nw) 2017-02-11 19:27:17 +01: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
intealls
51749ab970 Fix issues on 32-bit builds and clamp latency 2017-01-30 16:32:28 +01:00
Julian Sikorski
4c6cae2570 Fixed building using system portaudio 2017-01-26 19:11:46 +11:00
Stiletto
9db7b63e9a Updates "2016" strings to "2017 where relevant.
Updates "2016" strings to "2017 where relevant.
2017-01-24 17:29:49 -05:00
Vas Crabb
edf64df1db srcclean (nw) 2017-01-22 15:37:37 +11:00
intealls
ff0f5b2241 rename variables to maintain consistent with coreaudio/sdl etc 2017-01-19 00:37:38 +01:00
intealls
86cbd2acf6 fix up initialization 2017-01-19 00:21:10 +01:00
intealls
9422c23001 Simplify the audio buffer and fix a wrap-around issue 2017-01-18 04:35:06 +01:00
intealls
08bdab3b65 fix allowed latency range 2017-01-17 23:50:06 +01:00
Curt Coder
ebac862e2b OS X Cocoa debugger: Improved view scroll behavior. [Curt Coder] 2017-01-17 22:29:38 +02:00
Curt Coder
f096bee09b OS X Cocoa debugger: Autoscroll log window. [Curt Coder] 2017-01-17 22:29:38 +02:00
intealls
9d1c8c45ae fix indentation, leading spaces to tabs 2017-01-15 00:05:18 +01:00
intealls
d406d4dd2f some osd_printf_verbose calls should be to osd_printf_error 2017-01-14 22:15:12 +01:00
intealls
f0887bfd0a fix memory leak and log error checking 2017-01-14 22:00:59 +01:00
intealls
9b3214af37 tabs to spaces 2017-01-14 21:58:36 +01:00
R. Belmont
32c13ad929 Merge pull request #1959 from intealls/pa_oct16
PortAudio library update and backend
2017-01-12 20:30:12 -05:00
Brad Hughes
8f8facffe9 UWP: Fix alt key input (nw) 2017-01-11 18:32:02 -05:00
inte alls
cd03a64284 Initial PortAudio backend with build script changes to support library version 20161030 2017-01-11 20:24:00 +01:00
R. Belmont
311a56b958 Revert "New phosphor persistence shaders for HLSL" 2017-01-05 12:30:07 -05:00
ImJezze
ff28f114b4 Merge pull request #1843 from anikom15/hlsl
New phosphor persistence shaders for HLSL
2017-01-05 18:03:25 +01:00
Westley M. Martinez
2b95c8e50b Change cached texture format to floating point.
hlsl/phosphor.fx: Remove hacks

	ini/presets/raster.ini, ini/presets/vector-mono.ini,
ini/presets/vector.ini: Tweak presets

	src/osd/modules/render/d3d/d3dcomm.h,
src/osd/modules/render/d3d/d3dhlsl.cpp,
src/osd/modules/render/drawd3d.cpp: Change cache texture format to
floating point for precise for phosphor and ghosting shaders.
2017-01-04 17:44:46 -08:00
Westley M. Martinez
fad07814a0 Correct LCD ghosting INI and slider defaults. 2017-01-03 17:03:14 -08:00
Westley M. Martinez
91172125de Add LCD ghosting shader for Direct3D
hlsl/ghosting.fx: Add LCD ghosting shader

	hlsl/phosphor.fx: Remove LCD logic

	ini/presets/gameboy.ini, ini/presets/gba.ini,
ini/presets/lcd-matrix.ini, ini/presets/lcd.ini, ini/presets/raster.ini,
ini/presets/vector.ini: Update presets

	src/osd/modules/render/d3d/d3dhlsl.cpp,
src/osd/modules/render/d3d/d3dhlsl.h: Add LCD shader and sliders.  Allow
sliders to be adjusted for R, G, and B components.

	src/osd/windows/winmain.cpp, src/osd/windows/winmain.h: Add LCD
ghosting options.# Please enter the commit message for your changes. Lines starting
2017-01-02 15:42:33 -08:00