Commit Graph

2537 Commits

Author SHA1 Message Date
Dustin Stahlback
25adf42f70 Disable setting the SDL_WINDOW_OPENGL extra flag if -video none is set. This allows a true headless run when the environment variable SDL_VIDEODRIVER=dummy is set prior to mame/mess execution. 2018-10-09 08:45:09 -05:00
Westley M. Martinez
b5a54b761c HLSL Color Transforms and 3D LUT (#4043)
* Remove broken scanline uniform from post_pass

* Add 3D LUT to HLSL

* Allow individual LUTs for screen and UI

* WIP: Port 3D LUT to BGFX

* Finish porting LUT to BGFX

* Add individual phosphor color conversion for HLSL
	new file:   hlsl/chroma.fx
		Shader for converting xyY3 to sRGB
	modified:   hlsl/phosphor.fx
		Minor changes to emphasize idea that phosphors are color
agnostic
	modified:   hlsl/post.fx
		Conversion from signal RGB to xyY3
	modified:   src/osd/modules/render/d3d/d3dhlsl.cpp
	modified:   src/osd/modules/render/d3d/d3dhlsl.h
	modified:   src/osd/windows/winmain.cpp
	modified:   src/osd/windows/winmain.h

* Add phosphor examples and update presets

* Port phosphor color shaders to BGFX

* Fix missing newlines at EOF
2018-10-07 11:42:30 -04:00
mooglyguy
54dbfe1aa5 osdwindows: Fixed the BGFX not rendering across multiple windows. Internal UI is still glitchy. [Ryan Holtz] 2018-10-06 12:25:05 +02:00
mooglyguy
5a48ba0822 sun4: More optimizations, nw 2018-09-23 11:53:12 +02:00
Vas Crabb
250c06a4d7 srcclean (nw) 2018-09-23 12:22:35 +10:00
Vas Crabb
2993e850bb (nw) fix lots of inadverently mutable static pointers 2018-09-20 11:42:37 +10:00
ImJezze
e5095e131c - fix not set default uniforms for vector pass (#4008) 2018-09-17 21:07:20 +02:00
W. M. Martinez
b4888aabc0 Port scanline modification to BGFX 2018-09-14 19:00:52 -07:00
W. M. Martinez
e04d852034 HLSL: Move scanline to occur before defocus
On branch scanline
Changes to be committed:
	modified:   hlsl/post.fx
		Remove scanline effect
	new file:   hlsl/scanline.fx
		Separate scanline effect into its own shader
	modified:   src/osd/modules/render/d3d/d3dhlsl.cpp
		Add scanline effect
	modified:   src/osd/modules/render/d3d/d3dhlsl.h
		Add scanline effect
2018-09-14 16:38:18 -07:00
smf-
33d101f293 fix clang build (nw) 2018-09-06 09:48:02 +01:00
Patrick Mackinlay
8919ce5645 interpro: notworking -> networking (#3815)
* interpro: notworking -> networking

These changes combine to make InterPro networking work on Windows with the TAP-Windows6 driver.
* osdnet: add a receive delay (1 frame) after transmit to avoid a time-travel problem
* taptun: pad short Ethernet frames and append FCS (Windows-only until Linux taptun behaviour is verified)
* clipper: fix bugs in carry flag handling, prefer sign bit for tests
* i82586: fix transmit bug, handle reset

* networking: delayed transmit/receive

A second attempt to fix networking on InterPro systems, by introducing somewhat realistic delays into network transmit and receive paths. This version works by adding functions to device_network_interface which enable a device to be informed when the transmit or receive completes. The delay is only crudely approximated based on the specified bandwidth and the number of bytes being transmitted, but it should be good enough in practice. Existing drivers should not be impacted by these changes; overriding the new functions (and no longer overriding recv_cb) is necessary to obtain the new behaviour.

Changes from the previous commit:
* i82586: improve interrupt handling, implement delayed transmit/receive behaviour
* dinetwork: add transmit/receive delay timers, handlers and logic
* osdnet: remove receive delay, add the ability to start the receive timer
2018-09-04 19:26:58 +10:00
Vas Crabb
c87777a015 fixup (nw) 2018-08-27 01:30:08 +10:00
mooglyguy
8105b73548 -bgfx: Improved rendering with artwork by 5-10x or more. [Ryan Holtz] 2018-08-27 00:32:15 +10:00
AJR
25f32d22df Fix debug assert failure when using SDL fullscreen toggle (nw) 2018-08-06 00:30:13 -04:00
Vas Crabb
0ce07a8a1e (nw) more render work:
* Clean up some corner cases in layouts with repeating blocks
* Make complay.py validate many more elements and attributes
* Make complay.py easier to use for just validating a layout
* Remove redundant view from Sega VMU layout
* Make buttons visually respond to input in whousetc.lay
* Add view with LED displays as well as terminal for aim65_40 and use repeats
* Clean up some outdated "game" terminology in clifront.cpp
* Initiaise a couple of members in tap/tun network module
* Start documenting layout format
2018-07-31 04:18:28 +10:00
Patrick Mackinlay
7957feaefc taptun: add support for Windows (#3790)
* taptun: add support for Windows

Looking for feedback only at this point, because it's the first time I've attempted any OSD stuff - be gentle.

This extends the existing taptun OSD module to support Windows through the TAP-Windows6 driver (https://github.com/OpenVPN/tap-windows6).
* TAP-Windows6 is GPLv2, however only the header file is required in MAME, and the driver itself is entirely optional.
* I've tried to minimise the size of the diff, rather than completely separate the Windows/non-Windows implementations - not sure which is preferable in this case.
* The license file has Mac(?) line-endings - unsure if they should be normalized or used verbatim.
* Uncertain about the non-Windows case (or the Windows SDL case) - existing code uses __linux__, but I'm not clear on how that works with OSX, for example?
* I can't claim this actually "works" yet, because I don't know enough to configure the tap end of it properly to get networking doing something useful, but I will get there and correct anything necessary in a subsequent real PR.

* minor fixes/improvements (nw)

* Use Unicode Windows APIs, and UTF-8 for MAME
* Deal with unterminated registry string values
* Cancel any pending I/O in destructor
2018-07-30 18:52:11 +10:00
Vas Crabb
9db24aa2e9 Better support for screen orientation/geometry:
* Eliminates the need for the horizontal/vertical/LCD/SVG layout files
* Screens can now have orientation and physical aspect ratio specified
* RASTER/VECTOR defaults to 4:3, LCD/SVG defaults to square pixels at config time
* System orientation is applied on top of screen orientation

Automatically generated single-screen views and orientation flags in XML
output now work correctly for systems with multiple screens in different
geometries/orientations, e.g. housemnq, rocnms, stepstag, or netmerc.

The "core rotation options" only interact with system orientation.
Allowing multi-screen systems to work well with one monitor per emulated
screen is a complex topic.  System orientation also affects the GFX
viewer while screen orientation doesn't.  The orientation displayed in
the system selection menu is from the system orientation.

Let me know if I've broken any systems or use cases.

Also, add save state support for std::array/C array nested to any depth.
2018-07-26 23:11:02 +10:00
Olivier Galibert
5e969f3605 Damn this design is ridiculous, let's just make it a little less crash-prone (nw) 2018-07-18 10:29:35 +02:00
Olivier Galibert
82bf95e023 Not going to pretend I understand that code, but that reduces blowups (nw) 2018-07-18 09:56:09 +02:00
Justin Kerk
370a411987 Fix crash when running a DRC CPU core under Emscripten (#2794). [Justin Kerk] 2018-07-15 04:37:46 +00:00
AJR
2c552c44b5 Remove running_machine::device() call in QT debugger (nw) 2018-07-07 18:14:44 -04:00
smf-
b747b711bb fix building with clang 6.0.1 (nw) 2018-07-07 11:28:01 +01:00
AJR
989ce6d988 How to remove unwanted macros, or: getting out of discovered "check" (nw)
This fixes the OS X build.
2018-06-29 23:50:50 -04:00
cracyc
ff21c59e8a osdlib: GetCurrentProcessId is valid on uwp (nw) 2018-06-09 09:31:06 -05:00
cracyc
a99407afb5 Discord plugin try 2 (#3640)
* plugins/discord: discord presence plugin [Carl]

* plugins/discord: use domain sockets and pipes [Carl]

* winptty: fix connecting to existing socket (nw)
plugins/discord: show pause state (nw)

* plugins/discord: fix pause behavior (nw)
2018-06-08 19:25:39 -04:00
cracyc
dabbd32a62 osdnet: don't call it close (nw) 2018-06-01 08:41:30 -05:00
cracyc
71046c63c2 osdnet: prevent segfault at stop and when selecting device from menu (nw) 2018-06-01 08:14:05 -05:00
Vas Crabb
c15531dddc srcclean (nw) 2018-05-27 04:48:13 +10:00
AJR
cb1c49df0b Make "Keypad ," and "Keypad =" standard keys 2018-05-11 10:31:01 -04:00
arbee
a823b5cc65 Output system changes [headkaze, R. Belmont]
* Cleaned up syntax for network provider
* Added pause and savestate commands to both network and win32 providers
2018-05-06 21:22:30 -04:00
Justin Kerk
ab7a8ecc6f Really disable multithreading on the Emscripten target (nw) 2018-05-01 04:49:48 +00:00
Sven Schnelle
55fcef04ef Set SO_REUSEADDR in posixsocket
Without it you have to wait until the socket is moved
out of the TIME_WAIT state, which can take quite a while.
This is pretty anoying when using mame with serial ports
forwarded via TCP.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
2018-04-16 16:15:40 +02:00
Vas Crabb
418bc70cfa fix count_leading_zeroes(0) C fallback (nw) 2018-03-22 03:23:57 +11:00
smf-
1db4f6bac0 add missing override (nw) 2018-03-15 15:54:36 +00:00
Ryan Holtz
81a35fb46e Remove all uses of first_screen() from core files, nw 2018-03-11 11:17:16 +01:00
mooglyguy
0fb0a650ea Remove first_screen() from kc85, ti990_4, aviwrite.cpp, and huc6270 comments. nw 2018-03-10 16:44:09 +01:00
Ryan Holtz
83d73bf02e Removed first_screen from wswan and d3d (nw) 2018-03-09 12:35:45 +01:00
Justin Kerk
1f80e58a10 Disable multithreading on the Emscripten target as it is not currently supported. Fixes e.g. drivers using discrete audio components. [Justin Kerk] 2018-03-06 07:39:05 +00:00
Julian Sikorski
8cc758355d Enable use of system-wide asio, glm and rapidjson (#3172)
* Fixed building using system utf8proc

* Fixed building using system portaudio

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

* Allow using system-wide glm headers

* Allow using system-wide rapidjson headers
2018-02-08 16:06:25 -05:00
Vas Crabb
4e8bb7c7e5 srcclean and regenerate localisations (nw) 2018-01-28 14:25:52 +11:00
firewave
38d1b54726 winmain.h: removed unused macro (nw) 2018-01-26 21:15:05 +11:00
AJR
ddf792d9ae Fix exception on exit (nw) 2018-01-24 21:14:07 -05:00
AJR
57bd62a1fb Eliminate core_strdup (nw) 2018-01-24 21:06:25 -05:00
arbee
b01ed80c85 fix compile on GCC 7.2.1 (nw) 2018-01-13 16:55:04 -05:00
mooglyguy
7f3f8fd245 -bgfx: Abstracted some view-related functions into bgfx_view class, nw 2018-01-13 22:13:38 +01:00
Vas Crabb
d697e8a992 Convert zippath directory to a C++ interface 2018-01-10 18:25:26 +11:00
Vas Crabb
1ef11ac752 detect attached debugger on OSX before generating trace/breakpoint trap 2018-01-10 06:51:15 +11:00
Vas Crabb
2f67583089 (nw) et3400: use keypad rather than keyboard type for keypad inputs; don't raise sigtrap in non-debug builds 2018-01-10 05:58:26 +11:00
smf-
15b496b792 really fixed MT06623 (don't use uninitialised gamma ramp) (nw) 2018-01-05 23:25:49 +00:00
Jonathan Holt
c25b98226d Updates "2017" strings to "2018" where relevant. 2018-01-06 00:48:05 +11:00
Ivan Vangelista
3242332a5c
drawd3d.cpp: fixed MT06623 (nw) 2018-01-05 13:26:37 +01:00
AJR
2f9ea2b4e1 Eliminate machine().firstcpu (nw) 2018-01-04 23:00:26 -05:00
R. Belmont
2a49d6dd44
Merge pull request #2989 from webghost009/bicubic_opengl
GLSL Bilinear Filter Fixes and Add Bicubic Filter
2018-01-02 08:08:06 -05:00
Aaron
5f1c95a450 Fix shader compilation error on AMD 2017-12-31 23:37:31 -08:00
mooglyguy
726157a7f2 bgfx: Use bgfx::ViewMode::Sequential, fixes handheld overlays, nw 2018-01-01 00:51:29 +01:00
Aaron
222b41d582 Add Bicubic Shader to OpenGL Backend
This shader uses the equation described by R. Keys in the paper 'Cubic Convolution Interpolation for Digital Image Processing' which is, in this case, the same as a Catmull-Rom spline. This produces a sharper upscaled image than bilinear filtering.

The new shader is selected by setting gl_glsl_filter to 2. Consequently, gl_glsl_filter is now treated as an int rather than a boolean.

Also fixed a variable name problem in the code guarded by GLSL_SOURCE_ON_DISK.
2017-12-30 00:29:47 -08:00
Aaron
6c456a2865 Fix Two Issues with the glsl Bilinear Shader
1. Off-by-one pixel coordinates
2. Sampling of wrong pixels at some non-integer stretch factors

First was noticed while comparing screenshots of the software and opengl w/glsl renderers (opengl output was shifted up and to the right). Fixed by subtracting a 1/2 pixel from the texture coordinates when calculating the bottom left pixel to use for interpolation.

Second was apparent when running pac-man fullscreen on a 1920x1080 screen and allowing non-integer stretching. Manifested as irregular horizontal 'steps' in the output. Fixed by sampling from the center of all pixels which should avoid any funny business in regards to pixel coordinate rounding.
2017-12-30 00:16:41 -08:00
smf-
d752ea6b3d fix building for windows with qt debugger. [smf] 2017-12-26 23:42:45 +00:00
smf-
926804b185 abusing include guards is bad mckay (nw) 2017-12-26 17:20:15 +00: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
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
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
Vas Crabb
46edbee6ed fix MT06785 2017-12-07 12:17:47 +11:00
Vas Crabb
843cf2982e allow compiler a little more optimisation leeway in x86 count_leading_* (nw) 2017-12-02 23:44:19 +11:00
Miodrag Milanovic
3917627494 Updated GENie, BGFX, BX, added BIMG since it is separated now, updated all shader binaries and MAME part of code to support new interfaces [Miodrag Milanovic] 2017-12-01 13:22:27 +01:00
Vas Crabb
af3cd2dd4d this file is Allman style, use nullptr for NULL pointers, DeviceIoControl returns BOOL so treat it like a boolean (nw) 2017-11-29 02:40:42 +11:00
Ted Green
64705c5ed3 chdman: Patch to allow chdman to access physical drives on Windows 10 2017-11-24 08:52:16 -07:00
Vas Crabb
3cd03fc149 get rid of branches in cout_leading_zeros and ount_leading_ones (nw) 2017-11-18 23:49:37 +11:00
AJR
0ddfd95a5a Rationale (nw) 2017-10-30 09:35:13 -04:00
AJR
867d1a6b9e Make SDL input less eager to generate double-click events when mouse doesn't move between clicks 2017-10-30 08:17:23 -04:00
AJR
0853bb469b Merge popcount implementation in emucore.h with the new eminline (nw) 2017-10-24 09:43:07 -04:00
Vas Crabb
37619d7ca2 C+14 dammit (nw) 2017-10-24 18:35:45 +11:00
Vas Crabb
6ab19ed5bc Added 32- and 64-bit population count utilities. Only used in ARM7 core for now. Requires -msse4.2 or -mpopcnt to use CPU feature on x86, requires -mpopcntb to use CPU feature on POWER. 2017-10-24 17:41:38 +11:00
Scott Stone
e3cdd178ef Top prescale value allowed via command-line is 3 (not 4) (nw) 2017-10-18 08:19:56 -04:00
Scott Stone
e94fb46f0b Fix for prescale value entry (MT#6720) (nw) 2017-10-18 08:15:03 -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
AJR
9308ed99dc Revert "xinput: the left+right triggers combined are considered the Z Axis, not Z Axis+Z Rotation where the axis resting position was at the middle of the trigger (nw)"
The DirectInput Z-axis trigger merger seems more widely considered a bug than a feature, and probably should not be the default MAME behavior.

This reverts commit 80a64430a3.
2017-10-13 19:25:43 -04:00
hap
80a64430a3 xinput: the left+right triggers combined are considered the Z Axis, not Z Axis+Z Rotation where the axis resting position was at the middle of the trigger (nw) 2017-10-13 22:11:08 +02: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
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
npwoods
3d553eda60 Attempted to sanitize/rationalize how we access UTF-8 command line arguments (#2532)
Specifically, this creates a call osd_get_command_line() that returns UTF-8 command line arguments as std::vector<std::string>.  On non-Windows platforms, this does nothing more than build the vector.  On Windows, this invokes GetCommandLineW() and CommandLineToArgvW().  This also attempts to unwind usage of wmain()/_tmain() on Windows, which is not standard.

Related to this, this fixes a bug in Imgtool; specifically, non-7 bit ASCII was not being handled correctly in Windows.

This is really an admission that the way that Windows handles Unicode and command line arguments sucks, and it is my belief that having a wmain() or _tmain() declaration specific for Windows is a worse solution.  C'est la vie.

I'm very open to the idea that src/osd/osdcore.[cpp|h] is not the best place to do this.  Let me know if I should move it.
2017-09-18 20:28:53 -04:00
AJR
e71705f57f D3D fix (nw) 2017-09-15 19:35:09 -04:00
AJR
98d3ff0175 Use std::unique_ptr to manage instances of slider_state (nw) 2017-09-15 19:04:22 -04:00
Miso Kim
41e044ae01 Modification for Android build (NDK r14b, build-tools 21.1.2 and gradle 2.2.1) (#2585) 2017-08-23 13:09:38 +10:00
Robbbert
bad461d288 (nw) Fixed the build. 2017-08-13 19:54:21 +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
461dcb6a77 log failure to get glyph, but keep drawing (nw) 2017-08-08 04:58:03 +10:00
Vas Crabb
0a6f98cd7d font_osx: handle fonts where space glyphs return a null bounding box (e.g. Hiragino family)
restore ability to localise info box headings
2017-08-06 12:04:54 +10:00
Vas Crabb
db69883e64 log some failures (nw) 2017-08-05 20:59:18 +10:00
Vas Crabb
b250f318d9 Use proper font metrics on OSX rather than trying to guess advance from glyph box
Update most of Japanese translation
2017-08-05 18:37:17 +10:00
Vas Crabb
8a1ba16a8f Revert "Attempted fix for QT debugger (nw)"
This reverts commit d8b1cb0191.
2017-08-01 15:20:17 +10:00
AJR
d8b1cb0191 Attempted fix for QT debugger (nw) 2017-08-01 01:01:48 -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
531c0e698e Merge tag 'mame0188'
MAME 0.188

Conflicts:
	src/mame/video/wolfpack.cpp
	src/osd/modules/debugger/win/consolewininfo.cpp
2017-07-26 13:08:17 +10:00
Vas Crabb
867f145b06 scope stuff down again, rvalue on left of ==, fewer early exits (nw) 2017-07-24 10:24:10 +10:00
yz70s
e9e209a34c In class consolewin_info method set_cpu does nothing if the cpu to be set is the current one (nw)
This solves a problem in the windows debugger where the registers view would always return to the topafter being scrolled down.
2017-07-24 10:21:22 +10:00
yz70s
0d8155ab2c In class consolewin_info method set_cpu does nothing if the cpu to be set is the current one (nw)
This solves a problem in the windows debugger where the registers view would always return to the topafter being scrolled down.
2017-07-23 18:27:54 +02:00
Vas Crabb
95ff6a6092 stupid API, I'll fix this one day (nw) 2017-07-23 16:32:54 +10:00
Vas Crabb
ba3d0a88d6 srcclean (nw) 2017-07-23 13:29:00 +10:00